Skip to content

Commit

Permalink
Feature 1620 : add triggers on admin side for categories and batch mode.
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@5933 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
nikrou committed Apr 21, 2010
1 parent d406fe1 commit 23cc91f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
5 changes: 5 additions & 0 deletions admin.php
Expand Up @@ -29,6 +29,8 @@
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');

trigger_action('loc_begin_admin');

// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+
Expand Down Expand Up @@ -168,6 +170,9 @@ function UC_name_compare($a, $b)
$template->assign( 'pwgmenu', pwg_URL() );

include(PHPWG_ROOT_PATH.'include/page_header.php');

trigger_action('loc_end_admin');

$template->pparse('admin');

// +-----------------------------------------------------------------------+
Expand Down
5 changes: 5 additions & 0 deletions admin/cat_list.php
Expand Up @@ -33,6 +33,8 @@
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);

trigger_action('loc_begin_cat_list');

if (!empty($_POST) or isset($_GET['delete']))
{
check_pwg_token();
Expand Down Expand Up @@ -284,6 +286,9 @@ function save_categories_order($categories)
}
$template->append('categories', $tpl_cat);
}

trigger_action('loc_end_cat_list');

// +-----------------------------------------------------------------------+
// | sending html code |
// +-----------------------------------------------------------------------+
Expand Down
6 changes: 5 additions & 1 deletion admin/cat_modify.php
Expand Up @@ -33,6 +33,8 @@
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);

trigger_action('loc_begin_cat_modify');

//---------------------------------------------------------------- verification
if ( !isset( $_GET['cat_id'] ) || !is_numeric( $_GET['cat_id'] ) )
{
Expand Down Expand Up @@ -555,6 +557,8 @@
);
}

trigger_action('loc_end_cat_modify');

//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'categories');
?>
?>
4 changes: 4 additions & 0 deletions admin/element_set_global.php
Expand Up @@ -39,6 +39,8 @@
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);

trigger_action('loc_begin_element_set_global');

// +-----------------------------------------------------------------------+
// | deletion form submission |
// +-----------------------------------------------------------------------+
Expand Down Expand Up @@ -476,6 +478,8 @@
}
}

trigger_action('loc_end_element_set_global');

//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'element_set_global');
?>
4 changes: 4 additions & 0 deletions admin/element_set_unit.php
Expand Up @@ -39,6 +39,8 @@
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);

trigger_action('loc_begin_element_set_unit');

// +-----------------------------------------------------------------------+
// | unit mode form submission |
// +-----------------------------------------------------------------------+
Expand Down Expand Up @@ -254,6 +256,8 @@
$template->assign('ELEMENT_IDS', implode(',', $element_ids));
}

trigger_action('loc_end_element_set_unit');

// +-----------------------------------------------------------------------+
// | sending html code |
// +-----------------------------------------------------------------------+
Expand Down

0 comments on commit 23cc91f

Please sign in to comment.