Changeset 1154
- Timestamp:
- 11/12/11 13:24:50 (6 months ago)
- Location:
- trunk/smf
- Files:
-
- 16 edited
-
SSI.php (modified) (3 diffs)
-
Sources/DumpDatabase.php (modified) (4 diffs)
-
Sources/Load.php (modified) (2 diffs)
-
Sources/ManageNews.php (modified) (3 diffs)
-
Sources/ManageSearch.php (modified) (3 diffs)
-
Sources/ManageSmileys.php (modified) (6 diffs)
-
Sources/News.php (modified) (3 diffs)
-
Sources/PackageGet.php (modified) (3 diffs)
-
Sources/QueryString.php (modified) (3 diffs)
-
Sources/Search.php (modified) (2 diffs)
-
Sources/Subs-Members.php (modified) (3 diffs)
-
Sources/Subs-Package.php (modified) (3 diffs)
-
Sources/Subs.php (modified) (4 diffs)
-
Themes/default/Admin.template.php (modified) (5 diffs)
-
Themes/default/Display.template.php (modified) (2 diffs)
-
index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/smf/SSI.php
r1048 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 7*8 * Software Version: SMF 1.1.13 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) * … … 161 161 loadPermissions(); 162 162 163 // Do we allow guests in here? 164 if (empty($ssi_guest_access) && empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && basename($_SERVER['PHP_SELF']) != 'SSI.php') 165 { 166 require_once($sourcedir . '/Subs-Auth.php'); 167 KickGuest(); 168 obExit(null, true); 169 } 170 163 171 // Load the stuff like the menu bar, etc. 164 172 if (isset($ssi_layers)) … … 179 187 180 188 // Call a function passed by GET. 181 if (isset($_GET['ssi_function']) && function_exists('ssi_' . $_GET['ssi_function']) )189 if (isset($_GET['ssi_function']) && function_exists('ssi_' . $_GET['ssi_function']) && (!empty($modSettings['allow_guestAccess']) || !$user_info['is_guest'])) 182 190 { 183 191 call_user_func('ssi_' . $_GET['ssi_function']); -
trunk/smf/Sources/DumpDatabase.php
r852 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1 *8 * Software Version: SMF 1.1.12 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) * … … 65 65 // Attempt to stop from dying... 66 66 @set_time_limit(600); 67 @ini_set('memory_limit', '128M'); 67 if (@ini_get('memory_limit') < 256) 68 @ini_set('memory_limit', '256M'); 68 69 69 70 // Start saving the output... (don't do it otherwise for memory reasons.) … … 102 103 103 104 // Tell the client to save this file, even though it's text. 104 header('Content-Type: application/octetstream');105 header('Content-Type: ' . ($context['browser']['is_ie'] || $context['browser']['is_opera'] ? 'application/octetstream' : 'application/octet-stream')); 105 106 header('Content-Encoding: none'); 106 107 … … 327 328 @mysql_free_result($result); 328 329 330 // MySQL users below 4.0 can not use Engine 331 if (version_compare('4', preg_replace('~\-.+?$~', '', min(mysql_get_server_info(), mysql_get_client_info()))) > 0) 332 $schema_type = 'TYPE='; 333 else 334 $schema_type = 'ENGINE='; 335 329 336 // Probably MyISAM.... and it might have a comment. 330 $schema_create .= $crlf . ') TYPE='. (isset($row['Type']) ? $row['Type'] : $row['Engine']) . ($row['Comment'] != '' ? ' COMMENT="' . $row['Comment'] . '"' : '');337 $schema_create .= $crlf . ') ' . $schema_type . (isset($row['Type']) ? $row['Type'] : $row['Engine']) . ($row['Comment'] != '' ? ' COMMENT="' . $row['Comment'] . '"' : ''); 331 338 332 339 return $schema_create; -
trunk/smf/Sources/Load.php
r1121 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 1*8 * Software Version: SMF 1.1.15 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 189 189 'entity_fix' => create_function('$string', ' 190 190 $num = substr($string, 0, 1) === \'x\' ? hexdec(substr($string, 1)) : (int) $string; 191 return $num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) ? \'\' : \'&#\' . $num . \';\';'),191 return $num < 0x20 || $num === 0x202E || $num === 0x202D || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) ? \'\' : \'&#\' . $num . \';\';'), 192 192 'substr' => create_function('$string, $start, $length = null', ' 193 193 global $func; -
trunk/smf/Sources/ManageNews.php
r1017 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 5*8 * Software Version: SMF 1.1.13 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) * … … 168 168 unset($_POST['news'][$i]); 169 169 else 170 { 171 $_POST['news'][$i] = $func['htmlspecialchars']($_POST['news'][$i], ENT_QUOTES); 170 172 preparsecode($_POST['news'][$i]); 173 } 171 174 } 172 175 … … 182 185 $context['admin_current_news'][$id] = array( 183 186 'id' => $id, 184 'unparsed' => $func['htmlspecialchars'](un_preparsecode($line)),187 'unparsed' => un_preparsecode($line), 185 188 'parsed' => preg_replace('~<([/]?)form[^>]*?[>]*>~i', '<em class="smalltext"><$1form></em>', parse_bbc($line)), 186 189 ); -
trunk/smf/Sources/ManageSearch.php
r1121 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 2 *8 * Software Version: SMF 1.1.12 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) * … … 417 417 DROP TABLE IF EXISTS {$db_prefix}log_search_words", __FILE__, __LINE__); 418 418 419 // MySQL users below 4.0 can not use Engine 420 if (version_compare('4', preg_replace('~\-.+?$~', '', min(mysql_get_server_info(), mysql_get_client_info()))) > 0) 421 $schema_type = 'TYPE='; 422 else 423 $schema_type = 'ENGINE='; 424 419 425 db_query(" 420 426 CREATE TABLE {$db_prefix}log_search_words ( … … 422 428 ID_MSG int(10) unsigned NOT NULL default '0', 423 429 PRIMARY KEY (ID_WORD, ID_MSG) 424 ) TYPE=MyISAM", __FILE__, __LINE__);425 430 ) " . $schema_type . "MyISAM", __FILE__, __LINE__); 431 426 432 // Temporarily switch back to not using a search index. 427 433 if (!empty($modSettings['search_index']) && $modSettings['search_index'] == 'custom') -
trunk/smf/Sources/ManageSmileys.php
r1121 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 1*8 * Software Version: SMF 1.1.12 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 49 49 50 50 void ImportSmileys($smileyPath) 51 // !!! 52 53 void EditMessageIcons() 54 // !!! 55 56 void sortSmileyTable() 51 57 // !!! 52 58 */ … … 152 158 $context['smiley_sets'] = explode(',', $modSettings['smiley_sets_known']); 153 159 160 // Make sure that the smileys are in the right order after enabling them. 161 if (isset($_POST['smiley_enable'])) 162 sortSmileyTable(); 163 154 164 updateSettings(array( 155 165 'smiley_sets_default' => empty($context['smiley_sets'][$_POST['default_smiley_set']]) ? 'default' : $context['smiley_sets'][$_POST['default_smiley_set']], … … 653 663 654 664 // Sort all smiley codes for more accurate parsing (longest code first). 655 db_query(" 656 ALTER TABLE {$db_prefix}smileys 657 ORDER BY LENGTH(code) DESC", __FILE__, __LINE__); 665 sortSmileyTable(); 658 666 } 659 667 … … 989 997 990 998 // Make sure the smiley codes are still in the right order. 991 db_query(" 992 ALTER TABLE {$db_prefix}smileys 993 ORDER BY LENGTH(code) DESC", __FILE__, __LINE__); 999 sortSmileyTable(); 994 1000 995 1001 cache_put_data('parsing_smileys', null, 480); … … 1137 1143 } 1138 1144 1145 // This function sorts the smiley table by code length, it is needed as MySQL withdrew support for functions in order by. 1146 function sortSmileyTable() 1147 { 1148 global $db_prefix; 1149 1150 // Add a sorting column. 1151 db_query(" 1152 ALTER TABLE {$db_prefix}smileys 1153 ADD temp_order mediumint(8) not null", __FILE__, __LINE__); 1154 1155 // Set the contents of this column. 1156 db_query(" 1157 UPDATE {$db_prefix}smileys 1158 SET temp_order = LENGTH(code)", __FILE__, __LINE__); 1159 1160 // Order the table by this column. 1161 db_query(" 1162 ALTER TABLE {$db_prefix}smileys 1163 ORDER BY temp_order DESC", __FILE__, __LINE__); 1164 1165 // Remove the sorting column. 1166 db_query(" 1167 ALTER TABLE {$db_prefix}smileys 1168 DROP temp_order", __FILE__, __LINE__); 1169 } 1170 1139 1171 ?> -
trunk/smf/Sources/News.php
r852 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1 *8 * Software Version: SMF 1.1.12 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) * … … 458 458 { 459 459 global $db_prefix, $scripturl; 460 461 if (!allowedTo('view_mlist')) 462 return array(); 460 463 461 464 // Find the most recent members. … … 722 725 723 726 // Load the member's contextual information! 724 if (!loadMemberContext($_GET['u']) )727 if (!loadMemberContext($_GET['u']) || !allowedTo('profile_view_any')) 725 728 return array(); 726 729 -
trunk/smf/Sources/PackageGet.php
r1121 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 1*8 * Software Version: SMF 1.1.12 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 140 140 { 141 141 $context['servers'][] = array( 142 'name' => htmlspecialchars($row['name']),143 'url' => htmlspecialchars($row['url']),142 'name' => $row['name'], 143 'url' => $row['url'], 144 144 'id' => $row['ID_SERVER'], 145 145 ); … … 675 675 if (substr($_POST['serverurl'], -1) == '/') 676 676 $_POST['serverurl'] = substr($_POST['serverurl'], 0, -1); 677 $servername = htmlspecialchars($_POST['servername']); 678 $serverurl = htmlspecialchars($_POST['serverurl']); 679 680 // Make sure the URL has the correct prefix. 681 if (strpos($serverurl, 'http://') !== 0 && strpos($serverurl, 'https://') !== 0) 682 $serverurl = 'http://' . $serverurl; 677 683 678 684 db_query(" 679 685 INSERT INTO {$db_prefix}package_servers 680 686 (name, url) 681 VALUES (SUBSTRING('$ _POST[servername]', 1, 255), SUBSTRING('$_POST[serverurl]', 1, 255))", __FILE__, __LINE__);687 VALUES (SUBSTRING('$servername', 1, 255), SUBSTRING('$serverurl', 1, 255))", __FILE__, __LINE__); 682 688 683 689 redirectexit('action=packageget'); -
trunk/smf/Sources/QueryString.php
r1048 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 9*8 * Software Version: SMF 1.1.13 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 206 206 // Now make absolutely sure it's a number. 207 207 $board = (int) $_REQUEST['board']; 208 $_REQUEST['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0; 208 209 209 210 // This is for "Who's Online" because it might come via POST - and it should be an int here. … … 240 241 241 242 // There should be a $_REQUEST['start'], some at least. If you need to default to other than 0, use $_GET['start']. 242 if (empty($_REQUEST['start']) || $_REQUEST['start'] < 0 )243 if (empty($_REQUEST['start']) || $_REQUEST['start'] < 0 || (int) $_REQUEST['start'] > 2147473647) 243 244 $_REQUEST['start'] = 0; 244 245 -
trunk/smf/Sources/Search.php
r1121 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 5*8 * Software Version: SMF 1.1.13 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) * … … 1365 1365 1 1366 1366 FROM ({$db_prefix}topics AS t, {$db_prefix}" . ($createTemporary ? 'tmp_' : '') . "log_search_topics AS lst) 1367 WHERE lst.ID_TOPIC = t.ID_TOPIC". (empty($modSettings['search_max_results']) ? '' : "1367 WHERE " . ($createTemporary ? '' : 'lst.ID_SEARCH = ' . $_SESSION['search_cache']['ID_SEARCH'] . ' AND ') . 'lst.ID_TOPIC = t.ID_TOPIC' . (empty($modSettings['search_max_results']) ? '' : " 1368 1368 LIMIT " . ($modSettings['search_max_results'] - $_SESSION['search_cache']['num_results'])), __FILE__, __LINE__); 1369 1369 -
trunk/smf/Sources/Subs-Members.php
r1048 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 9*8 * Software Version: SMF 1.1.15 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 874 874 function isReservedName($name, $current_ID_MEMBER = 0, $is_name = true, $fatal = true) 875 875 { 876 global $user_info, $modSettings, $db_prefix, $func; 877 876 global $user_info, $modSettings, $db_prefix, $func, $context; 877 878 // No cheating with entities please. 879 $replaceEntities = create_function('$string', ' 880 $num = substr($string, 0, 1) === \'x\' ? hexdec(substr($string, 1)) : (int) $string; 881 if ($num === 0x202E || $num === 0x202D) return \'\'; if (in_array($num, array(0x22, 0x26, 0x27, 0x3C, 0x3E))) return \'&#\' . $num . \';\';' . 882 (empty($context['utf8']) ? 'return $num < 0x20 ? \'\' : ($num < 0x80 ? chr($num) : \'&#\' . $string . \';\');' : ' 883 return $num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) ? \'\' : ($num < 0x80 ? chr($num) : ($num < 0x800 ? chr(192 | $num >> 6) . chr(128 | $num & 63) : ($num < 0x10000 ? chr(224 | $num >> 12) . chr(128 | $num >> 6 & 63) . chr(128 | $num & 63) : chr(240 | $num >> 18) . chr(128 | $num >> 12 & 63) . chr(128 | $num >> 6 & 63) . chr(128 | $num & 63))));') 884 ); 885 886 $name = preg_replace('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~e', '$replaceEntities(\'\\2\')', $name); 878 887 $checkName = $func['strtolower']($name); 879 888 … … 891 900 continue; 892 901 902 // The admin might've used entities too, level the playing field. 903 $reservedCheck = preg_replace('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~e', '$replaceEntities(\'\\2\')', $reserved); 904 893 905 // Case sensitive name? 894 $reservedCheck = empty($modSettings['reserveCase']) ? $func['strtolower']($reserved) : $reserved; 906 if (empty($modSettings['reserveCase'])) 907 $reservedCheck = $func['strtolower']($reservedCheck); 908 895 909 // If it's not just entire word, check for it in there somewhere... 896 910 if ($checkMe == $reservedCheck || ($func['strpos']($checkMe, $reservedCheck) !== false && empty($modSettings['reserveWord']))) -
trunk/smf/Sources/Subs-Package.php
r1017 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1. 5*8 * Software Version: SMF 1.1.12 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) * … … 1078 1078 1079 1079 list ($lower, $upper) = explode('-', $list); 1080 1081 if (trim($lower) <= $version && trim($upper) >= $version) 1082 return true; 1080 $lower = explode('.', $lower); 1081 $upper = explode('.', $upper); 1082 $version = explode('.', $version); 1083 1084 foreach ($upper as $key => $high) 1085 { 1086 // Let's check that this is at or below the upper... obviously. 1087 if (isset($version[$key]) && trim($version[$key]) > trim($high)) 1088 return false; 1089 1090 // OK, let's check it's above the lower key... if it exists! 1091 if (isset($lower[$key])) 1092 { 1093 // The version either needs to have something here (i.e. can't be 1.0 on a 1.0.11) AND needs to be greater or equal to. 1094 // Note that if it's a range lower[key] might be blank, in that case version can not be set! 1095 if (!empty($lower[$key]) && (!isset($version[$key]) || trim($version[$key]) < trim($lower[$key]))) 1096 return false; 1097 } 1098 } 1099 return true; 1083 1100 } 1084 1101 … … 2112 2129 static $keep_alive_dom = null, $keep_alive_fp = null; 2113 2130 2114 preg_match('~^(http|ftp)(s)?://([^/:]+)(:(\d ))?(.+)$~', $url, $match);2131 preg_match('~^(http|ftp)(s)?://([^/:]+)(:(\d+))?(.+)$~', $url, $match); 2115 2132 2116 2133 // An FTP url. We should try connecting and RETRieving it... -
trunk/smf/Sources/Subs.php
r1121 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 1*8 * Software Version: SMF 1.1.15 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 720 720 721 721 // Save whether $start was less than 0 or not. 722 $start = (int) $start; 722 723 $start_invalid = $start < 0; 723 724 … … 3340 3341 3341 3342 // Lewis Media no longer holds the copyright. 3342 $forum_copyright = str_replace(array('Lewis Media', ' href="http://www.lewismedia.com/"', '2001-'), array('Simple Machines LLC', 'href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software"', ''), $forum_copyright);3343 $forum_copyright = str_replace(array('Lewis Media', 'Simple Machines LLC', 'href="http://www.lewismedia.com/"', '2001-'), array('Simple Machines', 'Simple Machines', 'href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software"', ''), $forum_copyright); 3343 3344 3344 3345 echo ' … … 3352 3353 } 3353 3354 // If it's in the copyright, and we are outputting it... it's been found. 3354 elseif (isset($modSettings['copyright_key']) && sha1($modSettings['copyright_key'] . 'banjo') == '1d01885ece7a9355bdeb22ed107f0ffa8c323026'){$found = true; return;}elseif ((strpos($forum_copyright, '<a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">Powered by SMF') !== false || strpos($forum_copyright, '<a href="http://www.simplemachines.org/" onclick="this.href += \'referer.php?forum=' . urlencode($context['forum_name'] . '|' . $boardurl . '|' . $forum_version) . '\';" target="_blank">SMF') !== false || strpos($forum_copyright, '<a href="http://www.simplemachines.org/" target="_blank">SMF') !== false || strpos($forum_copyright, '<a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">SMF') !== false)&&((strpos($forum_copyright, '<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF ©') !== false && (strpos($forum_copyright, 'Lewis Media</a>') !== false || strpos($forum_copyright, 'Simple Machines LLC</a>') !== false)) || strpos($forum_copyright, '<a href="http://www.lewismedia.com/">Lewis Media</a>') !== false || strpos($forum_copyright, '<a href="http://www.lewismedia.com/" target="_blank">Lewis Media</a>') !== false || (strpos($forum_copyright, '<a href="http://www.simplemachines.org/about/copyright.php"') !== false && strpos($forum_copyright, 'Simple Machines LLC') !== false))){$found = true; echo $forum_copyright;}3355 elseif (isset($modSettings['copyright_key']) && sha1($modSettings['copyright_key'] . 'banjo') == '1d01885ece7a9355bdeb22ed107f0ffa8c323026'){$found = true; return;}elseif ((strpos($forum_copyright, '<a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">Powered by SMF') !== false || strpos($forum_copyright, '<a href="http://www.simplemachines.org/" onclick="this.href += \'referer.php?forum=' . urlencode($context['forum_name'] . '|' . $boardurl . '|' . $forum_version) . '\';" target="_blank">SMF') !== false || strpos($forum_copyright, '<a href="http://www.simplemachines.org/" target="_blank">SMF') !== false || strpos($forum_copyright, '<a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">SMF') !== false)&&((strpos($forum_copyright, '<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF ©') !== false && (strpos($forum_copyright, 'Lewis Media</a>') !== false || strpos($forum_copyright, 'Simple Machines</a>') !== false)) || strpos($forum_copyright, '<a href="http://www.lewismedia.com/">Lewis Media</a>') !== false || strpos($forum_copyright, '<a href="http://www.lewismedia.com/" target="_blank">Lewis Media</a>') !== false || (strpos($forum_copyright, '<a href="http://www.simplemachines.org/about/copyright.php"') !== false && strpos($forum_copyright, 'Simple Machines') !== false))){$found = true; echo $forum_copyright;} 3355 3356 3356 3357 echo ' -
trunk/smf/Themes/default/Admin.template.php
r1121 r1154 1 1 <?php 2 // Version: 1.1.1 ; Admin2 // Version: 1.1.12; Admin 3 3 4 4 // This contains the html for the side bar of the admin center, which is used for all admin pages. … … 666 666 } 667 667 668 function compareVersions(current, target) 669 { 670 // Are they equal, maybe? 671 if (current == target) 672 return false; 673 674 var currentVersion = current.split("."); 675 var targetVersion = target.split("."); 676 677 for (var i = 0, n = (currentVersion.length > targetVersion.length ? currentVersion.length : targetVersion.length); i < n; i++) 678 { 679 // Make sure both are set. 680 if (typeof(currentVersion[i]) == "undefined") 681 currentVersion[i] = "0"; 682 else if (typeof(targetVersion[i]) == "undefined") 683 targetVersion[i] = "0"; 684 685 // If they are same, move to the next set. 686 if (currentVersion[i] == targetVersion[i]) 687 continue; 688 // Otherwise a simple comparison... 689 else 690 return (parseInt(currentVersion[i]) < parseInt(targetVersion[i])); 691 } 692 693 return false; 694 } 695 668 696 function smfDetermineVersions() 669 697 { … … 699 727 if (typeof(versionType) != "undefined") 700 728 { 701 if (( highYour[versionType] < yourVersion|| highYour[versionType] == "??") && !lowVersion[versionType])729 if ((compareVersions(highYour[versionType], yourVersion) || highYour[versionType] == "??") && !lowVersion[versionType]) 702 730 highYour[versionType] = yourVersion; 703 if ( highCurrent[versionType] < smfVersions[filename]|| highCurrent[versionType] == "??")731 if (compareVersions(highCurrent[versionType], smfVersions[filename]) || highCurrent[versionType] == "??") 704 732 highCurrent[versionType] = smfVersions[filename]; 705 733 706 if ( yourVersion < smfVersions[filename])734 if (compareVersions(yourVersion, smfVersions[filename])) 707 735 { 708 736 lowVersion[versionType] = yourVersion; … … 710 738 } 711 739 } 712 else if ( yourVersion < smfVersions[filename])740 else if (compareVersions(yourVersion, smfVersions[filename])) 713 741 lowVersion[versionType] = yourVersion; 714 742 … … 732 760 setInnerHTML(document.getElementById("your" + filename + knownLanguages[i]), yourVersion); 733 761 734 if (( highYour["Languages"] < yourVersion|| highYour["Languages"] == "??") && !lowVersion["Languages"])762 if ((compareVersions(highYour["Languages"], yourVersion) || highYour["Languages"] == "??") && !lowVersion["Languages"]) 735 763 highYour["Languages"] = yourVersion; 736 if ( highCurrent["Languages"] < smfLanguageVersions[filename]|| highCurrent["Languages"] == "??")764 if (compareVersions(highCurrent["Languages"], smfLanguageVersions[filename]) || highCurrent["Languages"] == "??") 737 765 highCurrent["Languages"] = smfLanguageVersions[filename]; 738 766 739 if ( yourVersion < smfLanguageVersions[filename])767 if (compareVersions(yourVersion, smfLanguageVersions[filename])) 740 768 { 741 769 lowVersion["Languages"] = yourVersion; -
trunk/smf/Themes/default/Display.template.php
r852 r1154 1 1 <?php 2 // Version: 1.1 ; Display2 // Version: 1.1.12; Display 3 3 4 4 function template_main() … … 583 583 'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']), 584 584 'merge' => array('test' => 'can_merge', 'text' => 'smf252', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']), 585 'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] ),585 'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']), 586 586 'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']), 587 587 ); -
trunk/smf/index.php
r1121 r1154 6 6 * Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) * 7 7 * =============================================================================== * 8 * Software Version: SMF 1.1.1 1*8 * Software Version: SMF 1.1.15 * 9 9 * Software by: Simple Machines (http://www.simplemachines.org) * 10 10 * Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) * … … 35 35 */ 36 36 37 $forum_version = 'SMF 1.1.1 1';37 $forum_version = 'SMF 1.1.15'; 38 38 39 39 // Get everything started up...
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)