diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-04-19 15:05:39 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-04-19 15:05:39 +0000 |
| commit | 87b7ae578f3c8a72f847c3610bd1ef479569a3ff (patch) | |
| tree | 18739861ecebc98552ba69a7e527d0c6ffd51ae0 /phpBB/includes/functions.php | |
| parent | 4c05450291d939f0d6bf4ea3ba538719cf3b43ba (diff) | |
| download | forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.tar forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.tar.gz forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.tar.bz2 forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.tar.xz forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.zip | |
Removed need to send db as a parameter to functions
git-svn-id: file:///svn/phpbb/trunk@189 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
| -rw-r--r-- | phpBB/includes/functions.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e7b236f207..8bd31ba54e 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -22,8 +22,10 @@ * ***************************************************************************/ -function get_db_stat($db, $mode) +function get_db_stat($mode) { + global $db; + switch($mode){ case 'postcount': $sql = 'SELECT count(*) AS total FROM '.POSTS_TABLE; @@ -73,8 +75,9 @@ function get_db_stat($db, $mode) } -function make_jumpbox($db) +function make_jumpbox() { + global $db; global $l_jumpto, $l_noforums, $l_nocategories; $sql = "SELECT c.* @@ -157,8 +160,10 @@ function language_select($default, $name="language", $dirname="language/") return $lang_select; } -function theme_select($default, $db) +function theme_select($default) { + global $db; + $sql = "SELECT theme_id, theme_name FROM ".THEMES_TABLE." ORDER BY theme_name"; if($result = $db->sql_query($sql)) { @@ -337,8 +342,11 @@ function tz_select($default) return($tz_select); } -function validate_username(&$username, $db) +function validate_username(&$username) { + + global $db; + $username = trim($username); $username = strip_tags($username); $username = htmlspecialchars($username); |
