mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
- 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) git-svn-id: http://piwigo.org/svn/trunk@13240 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -30,22 +30,15 @@
|
||||
function get_root_url()
|
||||
{
|
||||
global $page;
|
||||
if ( isset($page['root_path']) )
|
||||
{
|
||||
$root_url = $page['root_path'];
|
||||
}
|
||||
else
|
||||
if ( ($root_url = @$page['root_path']) == null )
|
||||
{// TODO - add HERE the possibility to call PWG functions from external scripts
|
||||
$root_url = PHPWG_ROOT_PATH;
|
||||
if ( strncmp($root_url, './', 2) == 0 )
|
||||
{
|
||||
return substr($root_url, 2);
|
||||
}
|
||||
}
|
||||
if ( strncmp($root_url, './', 2) != 0 )
|
||||
{
|
||||
return $root_url;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (string)substr($root_url, 2);
|
||||
}
|
||||
return $root_url;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,28 +300,31 @@ function make_section_in_url($params)
|
||||
{
|
||||
global $conf;
|
||||
$section_string = '';
|
||||
$section = @$params['section'];
|
||||
if (!isset($section))
|
||||
{
|
||||
$section_of = array(
|
||||
'category' => 'categories',
|
||||
'tags' => 'tags',
|
||||
'list' => 'list',
|
||||
'search' => 'search',
|
||||
);
|
||||
|
||||
$section_of = array(
|
||||
'category' => 'categories',
|
||||
'tags' => 'tags',
|
||||
'list' => 'list',
|
||||
'search' => 'search',
|
||||
);
|
||||
foreach ($section_of as $param => $s)
|
||||
{
|
||||
if (isset($params[$param]))
|
||||
{
|
||||
$section = $s;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($section_of as $param => $section)
|
||||
{
|
||||
if (isset($params[$param]))
|
||||
{
|
||||
$params['section'] = $section;
|
||||
}
|
||||
}
|
||||
if (!isset($section))
|
||||
{
|
||||
$section = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($params['section']))
|
||||
{
|
||||
$params['section'] = 'none';
|
||||
}
|
||||
|
||||
switch($params['section'])
|
||||
switch($section)
|
||||
{
|
||||
case 'categories' :
|
||||
{
|
||||
@@ -420,7 +416,7 @@ function make_section_in_url($params)
|
||||
}
|
||||
default :
|
||||
{
|
||||
$section_string.= '/'.$params['section'];
|
||||
$section_string.= '/'.$section;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user