mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
- admin, comments and tags pages include page_header later in the code (as in picture and index) allowing plugins to change the header until the very end
- fix in admin.php : picture_modify requires cache invalidation - fix in site_update.php : some echo func calls changed to $template->output .= ... - upgraded prototype.js to latest version 1.5.1.1 git-svn-id: http://piwigo.org/svn/trunk@2107 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -74,7 +74,6 @@ $conf_link = $link_start.'configuration&section=';
|
|||||||
$title = l10n('PhpWebGallery Administration'); // for include/page_header.php
|
$title = l10n('PhpWebGallery Administration'); // for include/page_header.php
|
||||||
$page['page_banner'] = '<h1>'.l10n('PhpWebGallery Administration').'</h1>';
|
$page['page_banner'] = '<h1>'.l10n('PhpWebGallery Administration').'</h1>';
|
||||||
$page['body_id'] = 'theAdminPage';
|
$page['body_id'] = 'theAdminPage';
|
||||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
|
||||||
|
|
||||||
$template->set_filenames(array('admin' => 'admin.tpl'));
|
$template->set_filenames(array('admin' => 'admin.tpl'));
|
||||||
|
|
||||||
@@ -115,7 +114,7 @@ if ($conf['ws_access_control']) // Do we need to display ws_checker
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// required before plugin page inclusion
|
//---------------------------------------------------------------- plugin menus
|
||||||
$plugin_menu_links = array(
|
$plugin_menu_links = array(
|
||||||
array(
|
array(
|
||||||
'NAME' => l10n('admin'),
|
'NAME' => l10n('admin'),
|
||||||
@@ -124,16 +123,15 @@ $plugin_menu_links = array(
|
|||||||
);
|
);
|
||||||
$plugin_menu_links = trigger_event('get_admin_plugin_menu_links',
|
$plugin_menu_links = trigger_event('get_admin_plugin_menu_links',
|
||||||
$plugin_menu_links );
|
$plugin_menu_links );
|
||||||
|
|
||||||
|
|
||||||
include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php');
|
|
||||||
|
|
||||||
//------------------------------------------------------------- content display
|
|
||||||
foreach ($plugin_menu_links as $menu_item)
|
foreach ($plugin_menu_links as $menu_item)
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('plugin_menu.menu_item', $menu_item);
|
$template->assign_block_vars('plugin_menu.menu_item', $menu_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php');
|
||||||
|
|
||||||
|
//------------------------------------------------------------- content display
|
||||||
|
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
// | errors & infos |
|
// | errors & infos |
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
@@ -154,6 +152,7 @@ if (count($page['infos']) != 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||||
$template->parse('admin');
|
$template->parse('admin');
|
||||||
|
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
@@ -171,6 +170,7 @@ if (
|
|||||||
'cat_options', // ?only POST; public/private; lock/unlock
|
'cat_options', // ?only POST; public/private; lock/unlock
|
||||||
'cat_perm', // ?only POST
|
'cat_perm', // ?only POST
|
||||||
'element_set', // ?only POST; associate/dissociate
|
'element_set', // ?only POST; associate/dissociate
|
||||||
|
'picture_modify', // ?only POST; associate/dissociate
|
||||||
'user_list', // ?only POST; group assoc
|
'user_list', // ?only POST; group assoc
|
||||||
'user_perm',
|
'user_perm',
|
||||||
'group_perm',
|
'group_perm',
|
||||||
|
|||||||
+27
-29
@@ -231,7 +231,6 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id
|
|||||||
|
|
||||||
// retrieve sub-directories fulldirs from the site reader
|
// retrieve sub-directories fulldirs from the site reader
|
||||||
$fs_fulldirs = $site_reader->get_full_directories($basedir);
|
$fs_fulldirs = $site_reader->get_full_directories($basedir);
|
||||||
//print_r( $fs_fulldirs ); echo "<br>";
|
|
||||||
|
|
||||||
// get_full_directories doesn't include the base directory, so if it's a
|
// get_full_directories doesn't include the base directory, so if it's a
|
||||||
// category directory, we need to include it in our array
|
// category directory, we need to include it in our array
|
||||||
@@ -352,9 +351,9 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id
|
|||||||
$counts['del_categories'] = count($to_delete);
|
$counts['del_categories'] = count($to_delete);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<!-- scanning dirs : ';
|
$template->output .= '<!-- scanning dirs : '
|
||||||
echo get_elapsed_time($start, get_moment());
|
. get_elapsed_time($start, get_moment())
|
||||||
echo ' -->'."\n";
|
. ' -->'."\n";
|
||||||
}
|
}
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
// | files / elements |
|
// | files / elements |
|
||||||
@@ -366,8 +365,9 @@ if (isset($_POST['submit']) and $_POST['sync'] == 'files'
|
|||||||
$start= $start_files;
|
$start= $start_files;
|
||||||
|
|
||||||
$fs = $site_reader->get_elements($basedir);
|
$fs = $site_reader->get_elements($basedir);
|
||||||
//print_r($fs); echo "<br>";
|
$template->output .= '<!-- get_elements: '
|
||||||
echo '<!-- get_elements: '.get_elapsed_time($start, get_moment())." -->\n";
|
. get_elapsed_time($start, get_moment())
|
||||||
|
. " -->\n";
|
||||||
|
|
||||||
$cat_ids = array_diff(array_keys($db_categories), $to_delete);
|
$cat_ids = array_diff(array_keys($db_categories), $to_delete);
|
||||||
|
|
||||||
@@ -571,9 +571,9 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
|
|||||||
$counts['del_elements'] = count($to_delete_elements);
|
$counts['del_elements'] = count($to_delete_elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<!-- scanning files : ';
|
$template->output .= '<!-- scanning files : '
|
||||||
echo get_elapsed_time($start_files, get_moment());
|
. get_elapsed_time($start_files, get_moment())
|
||||||
echo ' -->'."\n";
|
. ' -->'."\n";
|
||||||
|
|
||||||
// retrieving informations given by uploaders
|
// retrieving informations given by uploaders
|
||||||
if (!$simulate and count($cat_ids) > 0)
|
if (!$simulate and count($cat_ids) > 0)
|
||||||
@@ -643,15 +643,15 @@ if (isset($_POST['submit'])
|
|||||||
{
|
{
|
||||||
$start = get_moment();
|
$start = get_moment();
|
||||||
update_category('all');
|
update_category('all');
|
||||||
echo '<!-- update_category(all) : ';
|
$template->output .= '<!-- update_category(all) : '
|
||||||
echo get_elapsed_time($start,get_moment());
|
. get_elapsed_time($start,get_moment())
|
||||||
echo ' -->'."\n";
|
. ' -->'."\n";
|
||||||
$start = get_moment();
|
$start = get_moment();
|
||||||
ordering();
|
ordering();
|
||||||
update_global_rank();
|
update_global_rank();
|
||||||
echo '<!-- ordering categories : ';
|
$template->output .= '<!-- ordering categories : '
|
||||||
echo get_elapsed_time($start, get_moment());
|
. get_elapsed_time($start, get_moment())
|
||||||
echo ' -->'."\n";
|
. ' -->'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['sync'] == 'files')
|
if ($_POST['sync'] == 'files')
|
||||||
@@ -670,9 +670,9 @@ if (isset($_POST['submit'])
|
|||||||
$files = get_filelist($opts['category_id'], $site_id,
|
$files = get_filelist($opts['category_id'], $site_id,
|
||||||
$opts['recursive'],
|
$opts['recursive'],
|
||||||
false);
|
false);
|
||||||
echo '<!-- get_filelist : ';
|
$template->output .= '<!-- get_filelist : '
|
||||||
echo get_elapsed_time($start, get_moment());
|
. get_elapsed_time($start, get_moment())
|
||||||
echo ' -->'."\n";
|
. ' -->'."\n";
|
||||||
$start = get_moment();
|
$start = get_moment();
|
||||||
|
|
||||||
$datas = array();
|
$datas = array();
|
||||||
@@ -716,9 +716,9 @@ if (isset($_POST['submit'])
|
|||||||
$datas
|
$datas
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo '<!-- update files : ';
|
$template->output .= '<!-- update files : '
|
||||||
echo get_elapsed_time($start,get_moment());
|
. get_elapsed_time($start,get_moment())
|
||||||
echo ' -->'."\n";
|
. ' -->'."\n";
|
||||||
}// end if sync files
|
}// end if sync files
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -772,9 +772,9 @@ if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync'])
|
|||||||
$opts['recursive'],
|
$opts['recursive'],
|
||||||
$opts['only_new']);
|
$opts['only_new']);
|
||||||
|
|
||||||
echo '<!-- get_filelist : ';
|
$template->output .= '<!-- get_filelist : '
|
||||||
echo get_elapsed_time($start, get_moment());
|
. get_elapsed_time($start, get_moment())
|
||||||
echo ' -->'."\n";
|
. ' -->'."\n";
|
||||||
|
|
||||||
$start = get_moment();
|
$start = get_moment();
|
||||||
$datas = array();
|
$datas = array();
|
||||||
@@ -848,8 +848,6 @@ SELECT id
|
|||||||
{
|
{
|
||||||
if (count($datas) > 0)
|
if (count($datas) > 0)
|
||||||
{
|
{
|
||||||
// echo '<pre>', print_r($datas); echo '</pre>';
|
|
||||||
|
|
||||||
mass_updates(
|
mass_updates(
|
||||||
IMAGES_TABLE,
|
IMAGES_TABLE,
|
||||||
// fields
|
// fields
|
||||||
@@ -871,9 +869,9 @@ SELECT id
|
|||||||
set_tags_of($tags_of);
|
set_tags_of($tags_of);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<!-- metadata update : ';
|
$template->output .= '<!-- metadata update : '
|
||||||
echo get_elapsed_time($start, get_moment());
|
. get_elapsed_time($start, get_moment())
|
||||||
echo ' -->'."\n";
|
. ' -->'."\n";
|
||||||
|
|
||||||
$template->assign_block_vars(
|
$template->assign_block_vars(
|
||||||
'metadata_result',
|
'metadata_result',
|
||||||
|
|||||||
+1
-3
@@ -4,7 +4,6 @@
|
|||||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
// | branch : BSF (Best So Far)
|
|
||||||
// | file : $Id$
|
// | file : $Id$
|
||||||
// | last update : $Date$
|
// | last update : $Date$
|
||||||
// | last modifier : $Author$
|
// | last modifier : $Author$
|
||||||
@@ -175,7 +174,6 @@ UPDATE '.COMMENTS_TABLE.'
|
|||||||
|
|
||||||
$title= l10n('title_comments');
|
$title= l10n('title_comments');
|
||||||
$page['body_id'] = 'theCommentsPage';
|
$page['body_id'] = 'theCommentsPage';
|
||||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
|
||||||
|
|
||||||
$template->set_filenames(array('comments'=>'comments.tpl'));
|
$template->set_filenames(array('comments'=>'comments.tpl'));
|
||||||
$template->assign_vars(
|
$template->assign_vars(
|
||||||
@@ -442,7 +440,7 @@ SELECT id, name, permalink, uppercats
|
|||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
// | html code display |
|
// | html code display |
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
$template->assign_block_vars('title',array());
|
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||||
$template->parse('comments');
|
$template->parse('comments');
|
||||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||||
?>
|
?>
|
||||||
@@ -59,7 +59,6 @@ check_status(ACCESS_GUEST);
|
|||||||
|
|
||||||
$title= l10n('Tags');
|
$title= l10n('Tags');
|
||||||
$page['body_id'] = 'theTagsPage';
|
$page['body_id'] = 'theTagsPage';
|
||||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
|
||||||
|
|
||||||
$template->set_filenames(array('tags'=>'tags.tpl'));
|
$template->set_filenames(array('tags'=>'tags.tpl'));
|
||||||
$template->assign_vars(
|
$template->assign_vars(
|
||||||
@@ -105,11 +104,7 @@ foreach ($tags as $tag)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// +-----------------------------------------------------------------------+
|
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||||
// | html code display |
|
|
||||||
// +-----------------------------------------------------------------------+
|
|
||||||
|
|
||||||
$template->assign_block_vars('title',array());
|
|
||||||
$template->parse('tags');
|
$template->parse('tags');
|
||||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||||
?>
|
?>
|
||||||
@@ -117,4 +117,3 @@ A.navThumb, A.navThumb:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.virtual_cat { background: #3f3f3f !important; }
|
.virtual_cat { background: #3f3f3f !important; }
|
||||||
#mbMenu #quicksearch > p { text-align: left; }
|
|
||||||
|
|||||||
Vendored
+2730
-1968
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user