Changeset 1611
- Timestamp:
- 04/21/08 12:55:03 (3 months ago)
- Files:
-
- branches/punbb-1.3-dev/extras/db_update.php (modified) (2 diffs)
- branches/punbb-1.3-dev/upload/include/cache.php (modified) (7 diffs)
- branches/punbb-1.3-dev/upload/include/common_admin.php (modified) (1 diff)
- branches/punbb-1.3-dev/upload/include/email.php (modified) (1 diff)
- branches/punbb-1.3-dev/upload/include/functions.php (modified) (24 diffs)
- branches/punbb-1.3-dev/upload/include/search_idx.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/punbb-1.3-dev/extras/db_update.php
r1610 r1611 259 259 function db_seems_utf8() 260 260 { 261 global $db_type, $ db;261 global $db_type, $pun_db; 262 262 263 263 $seems_utf8 = true; … … 291 291 function convert_table_utf8($table) 292 292 { 293 global $ db;293 global $pun_db; 294 294 295 295 $types = array( branches/punbb-1.3-dev/upload/include/cache.php
r1610 r1611 34 34 function generate_config_cache() 35 35 { 36 global $ db;36 global $pun_db; 37 37 38 38 // Get the forum config from the DB … … 65 65 function generate_bans_cache() 66 66 { 67 global $ db;67 global $pun_db; 68 68 69 69 // Get the ban list from the DB … … 103 103 function generate_ranks_cache() 104 104 { 105 global $ db;105 global $pun_db; 106 106 107 107 // Get the rank list from the DB … … 135 135 function generate_censors_cache() 136 136 { 137 global $ db;137 global $pun_db; 138 138 139 139 // Get the censor list from the DB … … 167 167 function generate_quickjump_cache($group_id = false) 168 168 { 169 global $ db, $lang_common, $pun_url, $pun_config, $pun_user, $base_url;169 global $pun_db, $lang_common, $pun_url, $pun_config, $pun_user, $base_url; 170 170 171 171 // If a group_id was supplied, we generate the quickjump cache for that group only … … 255 255 function generate_hooks_cache() 256 256 { 257 global $ db, $pun_config, $base_url;257 global $pun_db, $pun_config, $base_url; 258 258 259 259 // Get the hooks from the DB … … 300 300 function generate_updates_cache() 301 301 { 302 global $ db, $pun_config;302 global $pun_db, $pun_config; 303 303 304 304 // Get a list of installed hotfix extensions branches/punbb-1.3-dev/upload/include/common_admin.php
r1610 r1611 127 127 function prune($forum_id, $prune_sticky, $prune_date) 128 128 { 129 global $ db, $db_type;129 global $pun_db, $db_type; 130 130 131 131 // Fetch topics to prune branches/punbb-1.3-dev/upload/include/email.php
r1484 r1611 46 46 function is_banned_email($email) 47 47 { 48 global $ db, $pun_bans;48 global $pun_db, $pun_bans; 49 49 50 50 foreach ($pun_bans as $cur_ban) branches/punbb-1.3-dev/upload/include/functions.php
r1610 r1611 42 42 function authenticate_user($user, $password, $password_is_hash = false) 43 43 { 44 global $ db, $pun_user;44 global $pun_db, $pun_user; 45 45 46 46 ($hook = get_hook('fn_authenticate_user_start')) ? eval($hook) : null; … … 83 83 function cookie_login(&$pun_user) 84 84 { 85 global $ db, $db_type, $pun_config, $cookie_name, $cookie_path, $cookie_domain, $cookie_secure, $pun_time_formats, $pun_date_formats;85 global $pun_db, $db_type, $pun_config, $cookie_name, $cookie_path, $cookie_domain, $cookie_secure, $pun_time_formats, $pun_date_formats; 86 86 87 87 ($hook = get_hook('fn_cookie_login_start')) ? eval($hook) : null; … … 206 206 function set_default_user() 207 207 { 208 global $ db, $db_type, $pun_user, $pun_config;208 global $pun_db, $db_type, $pun_user, $pun_config; 209 209 210 210 ($hook = get_hook('fn_set_default_user_start')) ? eval($hook) : null; … … 299 299 function check_bans() 300 300 { 301 global $ db, $pun_config, $lang_common, $pun_user, $pun_bans;301 global $pun_db, $pun_config, $lang_common, $pun_user, $pun_bans; 302 302 303 303 ($hook = get_hook('fn_check_bans_start')) ? eval($hook) : null; … … 380 380 function update_users_online() 381 381 { 382 global $ db, $pun_config, $pun_user;382 global $pun_db, $pun_config, $pun_user; 383 383 384 384 $now = time(); … … 654 654 function sync_forum($forum_id) 655 655 { 656 global $ db;656 global $pun_db; 657 657 658 658 ($hook = get_hook('fn_sync_forum_start')) ? eval($hook) : null; … … 707 707 function sync_topic($topic_id) 708 708 { 709 global $ db;709 global $pun_db; 710 710 711 711 ($hook = get_hook('fn_sync_topic_start')) ? eval($hook) : null; … … 793 793 function add_user($user_info, &$new_uid) 794 794 { 795 global $ db, $base_url, $lang_common, $pun_config, $pun_user, $pun_url;795 global $pun_db, $base_url, $lang_common, $pun_config, $pun_user, $pun_url; 796 796 797 797 ($hook = get_hook('fn_add_user_start')) ? eval($hook) : null; … … 848 848 function delete_user($user_id) 849 849 { 850 global $ db, $db_type, $pun_config;850 global $pun_db, $db_type, $pun_config; 851 851 852 852 ($hook = get_hook('fn_delete_user_start')) ? eval($hook) : null; … … 965 965 function clean_forum_moderators() 966 966 { 967 global $ db;967 global $pun_db; 968 968 969 969 ($hook = get_hook('fn_clean_forum_moderators_start')) ? eval($hook) : null; … … 1031 1031 function delete_orphans() 1032 1032 { 1033 global $ db;1033 global $pun_db; 1034 1034 1035 1035 ($hook = get_hook('fn_delete_orphans_start')) ? eval($hook) : null; … … 1074 1074 function delete_topic($topic_id, $forum_id) 1075 1075 { 1076 global $ db, $db_type;1076 global $pun_db, $db_type; 1077 1077 1078 1078 ($hook = get_hook('fn_delete_topic_start')) ? eval($hook) : null; … … 1139 1139 function delete_post($post_id, $topic_id, $forum_id) 1140 1140 { 1141 global $ db, $db_type;1141 global $pun_db, $db_type; 1142 1142 1143 1143 ($hook = get_hook('fn_delete_post_start')) ? eval($hook) : null; … … 1207 1207 function add_topic($post_info, &$new_tid, &$new_pid) 1208 1208 { 1209 global $ db, $db_type, $pun_config, $lang_common;1209 global $pun_db, $db_type, $pun_config, $lang_common; 1210 1210 1211 1211 ($hook = get_hook('fn_add_topic_start')) ? eval($hook) : null; … … 1280 1280 function add_post($post_info, &$new_pid) 1281 1281 { 1282 global $ db, $db_type, $pun_config, $lang_common;1282 global $pun_db, $db_type, $pun_config, $lang_common; 1283 1283 1284 1284 ($hook = get_hook('fn_add_post_start')) ? eval($hook) : null; … … 1368 1368 function send_subscriptions($post_info, $new_pid) 1369 1369 { 1370 global $pun_config, $ db, $pun_url, $lang_common;1370 global $pun_config, $pun_db, $pun_url, $lang_common; 1371 1371 1372 1372 ($hook = get_hook('fn_send_subscriptions_start')) ? eval($hook) : null; … … 1511 1511 function censor_words($text) 1512 1512 { 1513 global $ db;1513 global $pun_db; 1514 1514 static $search_for, $replace_with; 1515 1515 … … 1553 1553 function check_username_dupe($username, $exclude_id = null) 1554 1554 { 1555 global $ db;1555 global $pun_db; 1556 1556 1557 1557 ($hook = get_hook('fn_check_username_dupe_start')) ? eval($hook) : null; … … 1579 1579 function get_title($user) 1580 1580 { 1581 global $ db, $pun_config, $pun_bans, $lang_common;1581 global $pun_db, $pun_config, $pun_bans, $lang_common; 1582 1582 static $ban_list, $pun_ranks; 1583 1583 … … 1722 1722 function message($message, $link = '') 1723 1723 { 1724 global $ db, $pun_url, $lang_common, $pun_config, $base_url, $pun_start, $tpl_main, $pun_user, $pun_page, $pun_updates;1724 global $pun_db, $pun_url, $lang_common, $pun_config, $base_url, $pun_start, $tpl_main, $pun_user, $pun_page, $pun_updates; 1725 1725 1726 1726 ($hook = get_hook('fn_message_start')) ? eval($hook) : null; … … 1763 1763 function csrf_confirm_form() 1764 1764 { 1765 global $ db, $pun_url, $lang_common, $pun_config, $base_url, $pun_start, $tpl_main, $pun_user, $pun_page, $pun_updates;1765 global $pun_db, $pun_url, $lang_common, $pun_config, $base_url, $pun_start, $tpl_main, $pun_user, $pun_page, $pun_updates; 1766 1766 1767 1767 // User pressed the cancel button … … 2181 2181 function maintenance_message() 2182 2182 { 2183 global $ db, $pun_config, $lang_common, $pun_user, $base_url;2183 global $pun_db, $pun_config, $lang_common, $pun_user, $base_url; 2184 2184 2185 2185 ($hook = get_hook('fn_maintenance_message_start')) ? eval($hook) : null; … … 2274 2274 function redirect($destination_url, $message) 2275 2275 { 2276 global $ db, $pun_config, $lang_common, $pun_user, $base_url;2276 global $pun_db, $pun_config, $lang_common, $pun_user, $base_url; 2277 2277 2278 2278 ($hook = get_hook('fn_redirect_start')) ? eval($hook) : null; … … 2504 2504 function get_saved_queries() 2505 2505 { 2506 global $ db, $lang_common;2506 global $pun_db, $lang_common; 2507 2507 2508 2508 // Get the queries so that we can print them out branches/punbb-1.3-dev/upload/include/search_idx.php
r1610 r1611 87 87 function update_search_index($mode, $post_id, $message, $subject = null) 88 88 { 89 global $db_type, $ db;89 global $db_type, $pun_db; 90 90 91 91 // Split old and new post/subject to obtain array of 'words' … … 193 193 function strip_search_index($post_ids) 194 194 { 195 global $db_type, $ db;195 global $db_type, $pun_db; 196 196 197 197 switch ($db_type)
