Skip to:
Content

bbPress.org

Changeset 24


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

We've got registration!

Location:
trunk
Files:
5 added
4 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?>
  • trunk/bb-settings.php

    r18 r24  
    2929$static_title = '';
    3030
    31 if ( !get_magic_quotes_gpc() ) {
    32     $_GET    = add_magic_quotes($_GET   );
    33     $_POST   = add_magic_quotes($_POST  );
    34     $_COOKIE = add_magic_quotes($_COOKIE);
    35     $_SERVER = add_magic_quotes($_SERVER);
    36 }
     31$_GET    = bb_global_sanitize($_GET   );
     32$_POST   = bb_global_sanitize($_POST  );
     33$_COOKIE = bb_global_sanitize($_COOKIE);
     34$_SERVER = bb_global_sanitize($_SERVER);
    3735
    3836function bb_shutdown_action_hook() {
  • trunk/bb-templates/login-form.php

    r5 r24  
    11<form name="login" method="post" action="<?php option('uri'); ?>bb-login.php">
    2 <p>
     2<p> <a href="<?php option('uri'); ?>register.php">Register</a> or login:<br />
    33  <label>Username:
    44  <input name="username" type="text" id="username" size="15" maxlength="40" value="<?php echo bb_specialchars($_COOKIE['bb_user_' . BBHASH], 1); ?>" />
  • trunk/bb-templates/post-form.php

    r5 r24  
    22<form name="post" id="post" method="post" action="<?php option('uri'); ?>bb-post.php">
    33<?php if ( is_forum() ) : ?>
     4<p>Before posting a new topic, <a href="<?php option('uri'); ?>search.php">be sure to search</a> to see if one has been started already.</p>
    45<p>
    56  <label>Topic:<br />
Note: See TracChangeset for help on using the changeset viewer.