Ignore:
Timestamp:
Feb 18, 2012, 9:46:46 PM (12 years ago)
Author:
rvelices
Message:
  • multisize thumb longest side can be smaller than the square size
  • remove unused css, shorten/optimize php called very often (at least theoretically should be faster)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_url.inc.php

    r12922 r13240  
    3131{
    3232  global $page;
    33   if ( isset($page['root_path']) )
    34   {
    35     $root_url = $page['root_path'];
    36   }
    37   else
     33  if ( ($root_url = @$page['root_path']) == null )
    3834  {// TODO - add HERE the possibility to call PWG functions from external scripts
    3935    $root_url = PHPWG_ROOT_PATH;
    40   }
    41   if ( strncmp($root_url, './', 2) != 0 )
    42   {
    43     return $root_url;
    44   }
    45   else
    46   {
    47     return (string)substr($root_url, 2);
    48   }
     36                if ( strncmp($root_url, './', 2) == 0 )
     37                {
     38                        return substr($root_url, 2);
     39                }
     40  }
     41        return $root_url;
    4942}
    5043
     
    308301  global $conf;
    309302  $section_string = '';
    310 
    311   $section_of = array(
    312     'category' => 'categories',
    313     'tags'     => 'tags',
    314     'list'     => 'list',
    315     'search'   => 'search',
    316     );
    317 
    318   foreach ($section_of as $param => $section)
    319   {
    320     if (isset($params[$param]))
    321     {
    322       $params['section'] = $section;
    323     }
    324   }
    325 
    326   if (!isset($params['section']))
    327   {
    328     $params['section'] = 'none';
    329   }
    330 
    331   switch($params['section'])
     303        $section = @$params['section'];
     304        if (!isset($section))
     305        {
     306                $section_of = array(
     307                        'category' => 'categories',
     308                        'tags'     => 'tags',
     309                        'list'     => 'list',
     310                        'search'   => 'search',
     311                        );
     312
     313                foreach ($section_of as $param => $s)
     314                {
     315                        if (isset($params[$param]))
     316                        {
     317                                $section = $s;
     318                        }
     319                }
     320
     321                if (!isset($section))
     322                {
     323                        $section = 'none';
     324                }
     325        }
     326
     327  switch($section)
    332328  {
    333329    case 'categories' :
     
    421417    default :
    422418    {
    423       $section_string.= '/'.$params['section'];
     419      $section_string.= '/'.$section;
    424420    }
    425421  }
Note: See TracChangeset for help on using the changeset viewer.