- php optims (small): remove/replace preg_xxx with faster simple string functions ...

git-svn-id: http://piwigo.org/svn/branches/2.0@2772 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2008-10-18 01:07:13 +00:00
parent 7a28366cba
commit 9652b322cb
3 changed files with 25 additions and 31 deletions
+3 -8
View File
@@ -65,10 +65,7 @@ else
}
// deleting first "/" if displayed
$tokens = explode(
'/',
preg_replace('#^/#', '', $rewritten)
);
$tokens = explode('/', ltrim($rewritten, '/') );
// $tokens = array(
// 0 => category,
// 1 => 12-foo,
@@ -183,7 +180,7 @@ if ('categories' == $page['section'] and !isset($page['flat']))
if (pwg_get_session_var('image_order',0) > 0)
{
$image_order_id = pwg_get_session_var('image_order');
$orders = get_category_preferred_image_orders();
// the current session stored image_order might be not compatible with
@@ -339,12 +336,10 @@ SELECT DISTINCT image_id
$items = array_from_query($query, 'image_id');
}
$title = get_tags_content_title();
$page = array_merge(
$page,
array(
'title' => $title,
'title' => get_tags_content_title(),
'items' => $items,
)
);