Changeset 369 for dev

Show
Ignore:
Timestamp:
01/16/09 21:04:17 (13 years ago)
Author:
exi
Message:

Updated smarty to 2.6.22.
Fixed the killsummarytable layout problem.
Implemented internal registry, its a place to put temporary variables without polluting the global namespace.
Implemented a fix to db_cache::markAffectedTables() from Kovell

Location:
dev/common
Files:
1 added
7 modified

Legend:

Unmodified
Added
Removed
  • dev/common/includes/class.config.php

    r364 r369  
    4343        $config_init = true; 
    4444 
     45        $defaults = array(); 
     46        $defaults['summarytable_rowcount'] = 8; 
     47        $defaults['killcount'] = 50; 
     48        $defaults['kill_points'] = 1; 
     49        $defaults['least_active'] = 0; 
     50        registry::set('config_defaults', $defaults); 
     51 
    4552        if (config::get('post_password') === null) 
    4653        { 
     
    4855            config::set('style_name', 'default'); 
    4956            config::set('style_banner', 'default'); 
    50             config::set('kill_points', 1); 
    51             config::set('least_active', 0); 
    5257            config::set('post_password', 'CHANGEME'); 
    5358                        config::set('comment_password', 'CHANGEME'); 
     
    155160        // add important upgrade configs here, they will return the default if not set 
    156161        // they will be shown as set but take no space in the database 
    157         $defaults = array('summarytable_rowcount' => 8); 
    158                 $defaults = array('killcount' => 50); 
     162        $defaults = registry::get('config_defaults'); 
    159163 
    160164        if (!isset($defaults[$key])) 
  • dev/common/includes/class.db_cache.php

    r365 r369  
    106106        $text = trim(strtolower($this->_sql)); 
    107107        $text = str_replace(array('ignore','`', "\r\n", "\n"), '', $text); 
    108         $ta = preg_split('/ /', $text, 0, PREG_SPLIT_NO_EMPTY); 
     108        $text = str_replace('(', ' (', $text); 
     109        $ta = preg_split('/\s/', $text, 0, PREG_SPLIT_NO_EMPTY); 
    109110 
    110111        // check for sql keywords and get the table from the appropriate position 
  • dev/common/includes/class.killsummarytable.php

    r367 r369  
    231231        $odd = false; 
    232232        $prevdate = ""; 
    233         $width = round($this->break_/count($entry)*100); 
    234         $width_abs = round($this->break_/count($entry)*600); 
     233        $num = count($entry); 
     234        $width_mod = $this->break_/$num; 
     235        $width = round($width_mod*100); 
     236        $width_abs = round($width_mod*(760-60/$width_mod)); 
    235237 
    236238        $html .= "<table class=kb-subtable width=\"100%\" border=\"0\" cellspacing=0>"; 
     
    245247        else 
    246248        { 
    247             $header = "<tr class=kb-table-header><td class=kb-table-cell>Ship class</td><td class=kb-table-cell width=30 align=center>K</td><td class=kb-table-cell width=30 align=center>L</td></tr>"; 
     249            $header = "<tr class=kb-table-header><td class=kb-table-cell width=\"$width_abs\">Ship class</td><td class=kb-table-cell width=30 align=center>K</td><td class=kb-table-cell width=30 align=center>L</td></tr>"; 
    248250        } 
    249251 
  • dev/common/index.php

    r343 r369  
    2626require_once('common/includes/php_compat.php'); 
    2727require_once('common/includes/db.php'); 
     28require_once('common/includes/class.registry.php'); 
    2829require_once('common/includes/class.config.php'); 
    2930require_once('common/includes/class.killboard.php'); 
  • dev/common/smarty/Config_File.class.php

    r362 r369  
    2323 * 
    2424 * @link http://www.smarty.net/ 
    25  * @version 2.6.19-dev 
     25 * @version 2.6.22 
    2626 * @copyright Copyright: 2001-2005 New Digital Group, Inc. 
    2727 * @author Andrei Zmievski <andrei@php.net> 
  • dev/common/smarty/Smarty.class.php

    r362 r369  
    2828 * @author Andrei Zmievski <andrei@php.net> 
    2929 * @package Smarty 
    30  * @version 2.6.21 
     30 * @version 2.6.22 
    3131 */ 
    3232 
     
    465465     * @var string 
    466466     */ 
    467     var $_version              = '2.6.21'; 
     467    var $_version              = '2.6.22'; 
    468468 
    469469    /** 
  • dev/common/smarty/Smarty_Compiler.class.php

    r362 r369  
    2222 * @author Monte Ohrt <monte at ohrt dot com> 
    2323 * @author Andrei Zmievski <andrei@php.net> 
    24  * @version 2.6.21 
     24 * @version 2.6.22 
    2525 * @copyright 2001-2005 New Digital Group, Inc. 
    2626 * @package Smarty 
    2727 */ 
    2828 
    29 /* $Id: Smarty_Compiler.class.php 2797 2008-09-22 19:26:32Z monte.ohrt $ */ 
     29/* $Id: Smarty_Compiler.class.php 2966 2008-12-08 15:10:03Z monte.ohrt $ */ 
    3030 
    3131/** 
     
    171171                . '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)'; 
    172172       $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)'; 
    173        $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . '(?:' . $this->_obj_ext_regexp . '(?:'.$this->_obj_params_regexp . ')?)*' . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)'; 
     173       $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)'; 
    174174         
    175175        // matches valid modifier syntax: