mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
small code refactor - group together some code that should be together
git-svn-id: http://piwigo.org/svn/trunk@3167 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -108,6 +108,7 @@ if (script_basename() == 'picture') // basename without file extention
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['image_id'] = 0; // more work in picture.php
|
||||
if ( !empty($matches[2]) )
|
||||
{
|
||||
$page['image_file'] = $matches[2];
|
||||
@@ -562,12 +563,6 @@ if (isset($page['chronology_field']))
|
||||
initialize_calendar();
|
||||
}
|
||||
|
||||
if (script_basename() == 'picture'
|
||||
and !isset($page['image_id']) )
|
||||
{
|
||||
$page['image_id'] = 0; // more work in picture.php
|
||||
}
|
||||
|
||||
// add meta robots noindex, nofollow to avoid unnecesary robot crawls
|
||||
$page['meta_robots']=array();
|
||||
if ( isset($page['chronology_field'])
|
||||
|
||||
+8
-10
@@ -500,12 +500,6 @@ if (!empty($picture['current']['width']))
|
||||
);
|
||||
}
|
||||
|
||||
$url_admin =
|
||||
get_root_url().'admin.php?page=picture_modify'
|
||||
.'&cat_id='.(isset($page['category']) ? $page['category']['id'] : '')
|
||||
.'&image_id='.$page['image_id']
|
||||
;
|
||||
|
||||
$slideshow_params = array();
|
||||
$slideshow_url_params = array();
|
||||
|
||||
@@ -713,6 +707,11 @@ if (is_admin())
|
||||
);
|
||||
}
|
||||
|
||||
$url_admin =
|
||||
get_root_url().'admin.php?page=picture_modify'
|
||||
.'&cat_id='.(isset($page['category']) ? $page['category']['id'] : '')
|
||||
.'&image_id='.$page['image_id'];
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'U_CADDIE' => add_url_params($url_self,
|
||||
@@ -721,6 +720,8 @@ if (is_admin())
|
||||
'U_ADMIN' => $url_admin,
|
||||
)
|
||||
);
|
||||
|
||||
$template->assign('available_permission_levels', $conf['available_permission_levels']);
|
||||
}
|
||||
|
||||
// favorite manipulation
|
||||
@@ -929,10 +930,7 @@ $element_content = trigger_event(
|
||||
);
|
||||
$template->assign( 'ELEMENT_CONTENT', $element_content );
|
||||
|
||||
if (is_admin())
|
||||
{
|
||||
$template->assign('available_permission_levels', $conf['available_permission_levels']);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | sub pages |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user