Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/29/2004 12:59:50 AM (17 years ago)
Author:
matt
Message:

We've got registration!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/functions.php

    r21 r24  
    353353        $post_id = $bbdb->insert_id;
    354354        $bbdb->query("UPDATE $bbdb->forums SET posts = posts + 1 WHERE forum_id = $topic->forum_id");
    355         $bbdb->query("UPDATE $bbdb->topics SET topic_last_poster = $uid, topic_last_poster_name = '$uname',
     355        $bbdb->query("UPDATE $bbdb->topics SET topic_time = '$now', topic_last_poster = $uid, topic_last_poster_name = '$uname',
    356356        topic_last_post_id = $post_id, topic_posts = topic_posts + 1 WHERE topic_id = $tid");
    357357        bb_do_action('bb_new_post', $post_id);
     
    423423}
    424424
     425function bb_global_sanitize( $array ) {
     426    foreach ($array as $k => $v) {
     427        if ( is_array($v) ) {
     428            $array[$k] = bb_global_sanitize($v);
     429        } else {
     430            if ( get_magic_quotes_gpc() )
     431                $array[$k] = trim($v);
     432            else
     433                $array[$k] = addslashes( trim($v) );
     434        }
     435    }
     436    return $array;
     437}
     438
    425439?>
Note: See TracChangeset for help on using the changeset viewer.