Changeset 1154


Ignore:
Timestamp:
11/12/11 13:24:50 (6 months ago)
Author:
bogdan2412
Message:

Updated SMF to latest version 1.1.15.

Been running on live for the past three weeks with no new bug reports.

Location:
trunk/smf
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/smf/SSI.php

    r1048 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.7                                           * 
     8* Software Version:           SMF 1.1.13                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006 by:          Simple Machines LLC (http://www.simplemachines.org) * 
     
    161161loadPermissions(); 
    162162 
     163// Do we allow guests in here? 
     164if (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 
    163171// Load the stuff like the menu bar, etc. 
    164172if (isset($ssi_layers)) 
     
    179187 
    180188// Call a function passed by GET. 
    181 if (isset($_GET['ssi_function']) && function_exists('ssi_' . $_GET['ssi_function'])) 
     189if (isset($_GET['ssi_function']) && function_exists('ssi_' . $_GET['ssi_function']) && (!empty($modSettings['allow_guestAccess']) || !$user_info['is_guest'])) 
    182190{ 
    183191        call_user_func('ssi_' . $_GET['ssi_function']); 
  • trunk/smf/Sources/DumpDatabase.php

    r852 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1                                             * 
     8* Software Version:           SMF 1.1.12                                             * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006 by:          Simple Machines LLC (http://www.simplemachines.org) * 
     
    6565        // Attempt to stop from dying... 
    6666        @set_time_limit(600); 
    67         @ini_set('memory_limit', '128M'); 
     67        if (@ini_get('memory_limit') < 256) 
     68                @ini_set('memory_limit', '256M'); 
    6869 
    6970        // Start saving the output... (don't do it otherwise for memory reasons.) 
     
    102103 
    103104                // 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')); 
    105106                header('Content-Encoding: none'); 
    106107 
     
    327328        @mysql_free_result($result); 
    328329 
     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         
    329336        // 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'] . '"' : ''); 
    331338 
    332339        return $schema_create; 
  • trunk/smf/Sources/Load.php

    r1121 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.11                                          * 
     8* Software Version:           SMF 1.1.15                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2009 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    189189                'entity_fix' => create_function('$string', ' 
    190190                        $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 . \';\';'), 
    192192                'substr' => create_function('$string, $start, $length = null', ' 
    193193                        global $func; 
  • trunk/smf/Sources/ManageNews.php

    r1017 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.5                                           * 
     8* Software Version:           SMF 1.1.13                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    168168                                unset($_POST['news'][$i]); 
    169169                        else 
     170                        { 
     171                                $_POST['news'][$i] = $func['htmlspecialchars']($_POST['news'][$i], ENT_QUOTES); 
    170172                                preparsecode($_POST['news'][$i]); 
     173                        } 
    171174                } 
    172175 
     
    182185                $context['admin_current_news'][$id] = array( 
    183186                        'id' => $id, 
    184                         'unparsed' => $func['htmlspecialchars'](un_preparsecode($line)), 
     187                        'unparsed' => un_preparsecode($line), 
    185188                        'parsed' => preg_replace('~<([/]?)form[^>]*?[>]*>~i', '<em class="smalltext">&lt;$1form&gt;</em>', parse_bbc($line)), 
    186189                ); 
  • trunk/smf/Sources/ManageSearch.php

    r1121 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.2                                           * 
     8* Software Version:           SMF 1.1.12                                           * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    417417                                DROP TABLE IF EXISTS {$db_prefix}log_search_words", __FILE__, __LINE__); 
    418418 
     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 
    419425                        db_query(" 
    420426                                CREATE TABLE {$db_prefix}log_search_words ( 
     
    422428                                        ID_MSG int(10) unsigned NOT NULL default '0', 
    423429                                        PRIMARY KEY (ID_WORD, ID_MSG) 
    424                                 ) TYPE=MyISAM", __FILE__, __LINE__); 
    425                          
     430                                ) " . $schema_type . "MyISAM", __FILE__, __LINE__); 
     431 
    426432                        // Temporarily switch back to not using a search index. 
    427433                        if (!empty($modSettings['search_index']) && $modSettings['search_index'] == 'custom') 
  • trunk/smf/Sources/ManageSmileys.php

    r1121 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.11                                          * 
     8* Software Version:           SMF 1.1.12                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2009 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    4949 
    5050        void ImportSmileys($smileyPath) 
     51                // !!! 
     52 
     53        void EditMessageIcons() 
     54                // !!! 
     55 
     56        void sortSmileyTable() 
    5157                // !!! 
    5258*/ 
     
    152158                $context['smiley_sets'] = explode(',', $modSettings['smiley_sets_known']); 
    153159 
     160                // Make sure that the smileys are in the right order after enabling them. 
     161                if (isset($_POST['smiley_enable'])) 
     162                        sortSmileyTable(); 
     163 
    154164                updateSettings(array( 
    155165                        'smiley_sets_default' => empty($context['smiley_sets'][$_POST['default_smiley_set']]) ? 'default' : $context['smiley_sets'][$_POST['default_smiley_set']], 
     
    653663 
    654664                        // 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(); 
    658666                } 
    659667 
     
    989997 
    990998                // 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(); 
    9941000 
    9951001                cache_put_data('parsing_smileys', null, 480); 
     
    11371143} 
    11381144 
     1145// This function sorts the smiley table by code length, it is needed as MySQL withdrew support for functions in order by. 
     1146function 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 
    11391171?> 
  • trunk/smf/Sources/News.php

    r852 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1                                             * 
     8* Software Version:           SMF 1.1.12                                             * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006 by:          Simple Machines LLC (http://www.simplemachines.org) * 
     
    458458{ 
    459459        global $db_prefix, $scripturl; 
     460 
     461        if (!allowedTo('view_mlist')) 
     462                return array(); 
    460463 
    461464        // Find the most recent members. 
     
    722725 
    723726        // Load the member's contextual information! 
    724         if (!loadMemberContext($_GET['u'])) 
     727        if (!loadMemberContext($_GET['u']) || !allowedTo('profile_view_any')) 
    725728                return array(); 
    726729 
  • trunk/smf/Sources/PackageGet.php

    r1121 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.11                                          * 
     8* Software Version:           SMF 1.1.12                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2009 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    140140        { 
    141141                $context['servers'][] = array( 
    142                         'name' => htmlspecialchars($row['name']), 
    143                         'url' => htmlspecialchars($row['url']), 
     142                        'name' => $row['name'], 
     143                        'url' => $row['url'], 
    144144                        'id' => $row['ID_SERVER'], 
    145145                ); 
     
    675675        if (substr($_POST['serverurl'], -1) == '/') 
    676676                $_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; 
    677683 
    678684        db_query(" 
    679685                INSERT INTO {$db_prefix}package_servers 
    680686                        (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__); 
    682688 
    683689        redirectexit('action=packageget'); 
  • trunk/smf/Sources/QueryString.php

    r1048 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.9                                           * 
     8* Software Version:           SMF 1.1.13                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2009 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    206206                // Now make absolutely sure it's a number. 
    207207                $board = (int) $_REQUEST['board']; 
     208                $_REQUEST['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0; 
    208209 
    209210                // This is for "Who's Online" because it might come via POST - and it should be an int here. 
     
    240241 
    241242        // 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) 
    243244                $_REQUEST['start'] = 0; 
    244245 
  • trunk/smf/Sources/Search.php

    r1121 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.5                                           * 
     8* Software Version:           SMF 1.1.13                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    13651365                                                1 
    13661366                                        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']) ? '' : " 
    13681368                                        LIMIT " . ($modSettings['search_max_results'] - $_SESSION['search_cache']['num_results'])), __FILE__, __LINE__); 
    13691369 
  • trunk/smf/Sources/Subs-Members.php

    r1048 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.9                                           * 
     8* Software Version:           SMF 1.1.15                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2009 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    874874function isReservedName($name, $current_ID_MEMBER = 0, $is_name = true, $fatal = true) 
    875875{ 
    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); 
    878887        $checkName = $func['strtolower']($name); 
    879888 
     
    891900                                continue; 
    892901 
     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 
    893905                        // Case sensitive name? 
    894                         $reservedCheck = empty($modSettings['reserveCase']) ? $func['strtolower']($reserved) : $reserved; 
     906                        if (empty($modSettings['reserveCase'])) 
     907                                $reservedCheck = $func['strtolower']($reservedCheck); 
     908 
    895909                        // If it's not just entire word, check for it in there somewhere... 
    896910                        if ($checkMe == $reservedCheck || ($func['strpos']($checkMe, $reservedCheck) !== false && empty($modSettings['reserveWord']))) 
  • trunk/smf/Sources/Subs-Package.php

    r1017 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.5                                           * 
     8* Software Version:           SMF 1.1.12                                           * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    10781078 
    10791079                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; 
    10831100        } 
    10841101 
     
    21122129        static $keep_alive_dom = null, $keep_alive_fp = null; 
    21132130 
    2114         preg_match('~^(http|ftp)(s)?://([^/:]+)(:(\d))?(.+)$~', $url, $match); 
     2131        preg_match('~^(http|ftp)(s)?://([^/:]+)(:(\d+))?(.+)$~', $url, $match); 
    21152132 
    21162133        // An FTP url.  We should try connecting and RETRieving it... 
  • trunk/smf/Sources/Subs.php

    r1121 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.11                                          * 
     8* Software Version:           SMF 1.1.15                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2009 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    720720 
    721721        // Save whether $start was less than 0 or not. 
     722        $start = (int) $start; 
    722723        $start_invalid = $start < 0; 
    723724 
     
    33403341 
    33413342        // 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); 
    33433344 
    33443345        echo ' 
     
    33523353        } 
    33533354        // 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 &copy;') !== 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 &copy;') !== 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;} 
    33553356 
    33563357        echo ' 
  • trunk/smf/Themes/default/Admin.template.php

    r1121 r1154  
    11<?php 
    2 // Version: 1.1.1; Admin 
     2// Version: 1.1.12; Admin 
    33 
    44// This contains the html for the side bar of the admin center, which is used for all admin pages. 
     
    666666                        } 
    667667 
     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 
    668696                        function smfDetermineVersions() 
    669697                        { 
     
    699727                                        if (typeof(versionType) != "undefined") 
    700728                                        { 
    701                                                 if ((highYour[versionType] < yourVersion || highYour[versionType] == "??") && !lowVersion[versionType]) 
     729                                                if ((compareVersions(highYour[versionType], yourVersion) || highYour[versionType] == "??") && !lowVersion[versionType]) 
    702730                                                        highYour[versionType] = yourVersion; 
    703                                                 if (highCurrent[versionType] < smfVersions[filename] || highCurrent[versionType] == "??") 
     731                                                if (compareVersions(highCurrent[versionType], smfVersions[filename]) || highCurrent[versionType] == "??") 
    704732                                                        highCurrent[versionType] = smfVersions[filename]; 
    705733 
    706                                                 if (yourVersion < smfVersions[filename]) 
     734                                                if (compareVersions(yourVersion, smfVersions[filename])) 
    707735                                                { 
    708736                                                        lowVersion[versionType] = yourVersion; 
     
    710738                                                } 
    711739                                        } 
    712                                         else if (yourVersion < smfVersions[filename]) 
     740                                        else if (compareVersions(yourVersion, smfVersions[filename])) 
    713741                                                lowVersion[versionType] = yourVersion; 
    714742 
     
    732760                                                setInnerHTML(document.getElementById("your" + filename + knownLanguages[i]), yourVersion); 
    733761 
    734                                                 if ((highYour["Languages"] < yourVersion || highYour["Languages"] == "??") && !lowVersion["Languages"]) 
     762                                                if ((compareVersions(highYour["Languages"], yourVersion) || highYour["Languages"] == "??") && !lowVersion["Languages"]) 
    735763                                                        highYour["Languages"] = yourVersion; 
    736                                                 if (highCurrent["Languages"] < smfLanguageVersions[filename] || highCurrent["Languages"] == "??") 
     764                                                if (compareVersions(highCurrent["Languages"], smfLanguageVersions[filename]) || highCurrent["Languages"] == "??") 
    737765                                                        highCurrent["Languages"] = smfLanguageVersions[filename]; 
    738766 
    739                                                 if (yourVersion < smfLanguageVersions[filename]) 
     767                                                if (compareVersions(yourVersion, smfLanguageVersions[filename])) 
    740768                                                { 
    741769                                                        lowVersion["Languages"] = yourVersion; 
  • trunk/smf/Themes/default/Display.template.php

    r852 r1154  
    11<?php 
    2 // Version: 1.1; Display 
     2// Version: 1.1.12; Display 
    33 
    44function template_main() 
     
    583583                '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']), 
    584584                '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']), 
    586586                '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']), 
    587587        ); 
  • trunk/smf/index.php

    r1121 r1154  
    66* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    * 
    77* =============================================================================== * 
    8 * Software Version:           SMF 1.1.11                                          * 
     8* Software Version:           SMF 1.1.15                                          * 
    99* Software by:                Simple Machines (http://www.simplemachines.org)     * 
    1010* Copyright 2006-2009 by:     Simple Machines LLC (http://www.simplemachines.org) * 
     
    3535*/ 
    3636 
    37 $forum_version = 'SMF 1.1.11'; 
     37$forum_version = 'SMF 1.1.15'; 
    3838 
    3939// Get everything started up... 
Note: See TracChangeset for help on using the changeset viewer.