aboutsummaryrefslogtreecommitdiffstats
path: root/tools/triggers_list.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-07-24 09:42:38 +0000
committermistic100 <mistic@piwigo.org>2012-07-24 09:42:38 +0000
commitc6912b7896d963c5c7bcd92913e9183b4d6bd052 (patch)
tree650adcf3852b2dd3f794bc256b58aed76a8274d0 /tools/triggers_list.php
parent33c271855f325effb5256b38555e3e265e53a34e (diff)
update triggers_list and fix display bug
git-svn-id: http://piwigo.org/svn/trunk@16967 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'tools/triggers_list.php')
-rw-r--r--tools/triggers_list.php174
1 files changed, 90 insertions, 84 deletions
diff --git a/tools/triggers_list.php b/tools/triggers_list.php
index f8ec32eaa..4258124e3 100644
--- a/tools/triggers_list.php
+++ b/tools/triggers_list.php
@@ -25,87 +25,87 @@ $core = array(
array(
'name' => 'allow_increment_element_hit_count',
'type' => 'trigger_event',
- 'vars' => array('bool' => 'content_not_set'),
+ 'vars' => array('bool', 'content_not_set'),
'files' => array('picture.php'),
),
array(
'name' => 'begin_delete_elements',
'type' => 'trigger_action',
- 'vars' => array('array' => 'ids'),
+ 'vars' => array('array', 'ids'),
'files' => array('admin\include\functions.inc.php (delete_elements)'),
),
array(
'name' => 'blockmanager_apply',
'type' => 'trigger_action',
- 'vars' => array('object' => 'menublock'),
+ 'vars' => array('object', 'menublock'),
'files' => array('include\block.class.php (BlockManager::apply)'),
'infos' => 'use this trigger to modify existing menu blocks',
),
array(
'name' => 'blockmanager_prepare_display',
'type' => 'trigger_action',
- 'vars' => array('object' => 'this'),
+ 'vars' => array('object', 'this'),
'files' => array('include\block.class.php (BlockManager::prepare_display)'),
),
array(
'name' => 'blockmanager_register_blocks',
'type' => 'trigger_action',
- 'vars' => array('object' => 'menu'),
+ 'vars' => array('object', 'menu'),
'files' => array('include\block.class.php (BlockManager::load_registered_blocks)'),
'infos' => 'use this trigger to add menu block',
),
array(
'name' => 'clean_iptc_value',
'type' => 'trigger_event',
- 'vars' => array('string' => 'value'),
+ 'vars' => array('string', 'value'),
'files' => array('include\functions_metadata.inc.php (clean_iptc_value)'),
),
array(
'name' => 'combined_css',
'type' => 'trigger_event',
- 'vars' => array('string' => 'href', 'int' => 'file_ver0', 'int' => 'file_ver1'),
+ 'vars' => array('string', 'href', 'int', 'file_ver0', 'int', 'file_ver1'),
'files' => array('include\template.class.php (Template::flush)'),
),
array(
'name' => 'combined_css_postfilter',
'type' => 'trigger_event',
- 'vars' => array('string' => 'css'),
+ 'vars' => array('string', 'css'),
'files' => array('include\template.class.php (Template::process_css)'),
),
array(
'name' => 'combined_script',
'type' => 'trigger_event',
- 'vars' => array('string' => 'ret', 'string' => 'script'),
+ 'vars' => array('string', 'ret', 'string', 'script'),
'files' => array('include\template.class.php (Template::make_script_src)'),
),
array(
'name' => 'delete_categories',
'type' => 'trigger_action',
- 'vars' => array('array' => 'ids'),
+ 'vars' => array('array', 'ids'),
'files' => array('admin\include\functions.inc.php (delete_categories)'),
),
array(
'name' => 'delete_elements',
'type' => 'trigger_action',
- 'vars' => array('array' => 'ids'),
+ 'vars' => array('array', 'ids'),
'files' => array('admin\include\functions.inc.php (delete_elements)'),
),
array(
'name' => 'delete_user',
'type' => 'trigger_action',
- 'vars' => array('int' => 'user_id'),
+ 'vars' => array('int', 'user_id'),
'files' => array('admin\include\functions.inc.php (delete_user)'),
),
array(
'name' => 'element_set_global_action',
'type' => 'trigger_action',
- 'vars' => array('string' => 'action', 'array' => 'collection'),
+ 'vars' => array('string', 'action', 'array', 'collection'),
'files' => array('admin\batch_manager_global.php'),
),
array(
'name' => 'format_exif_data',
'type' => 'trigger_event',
- 'vars' => array('array' => 'exif', 'string' => 'filename', 'array' => 'map'),
+ 'vars' => array('array', 'exif', 'string', 'filename', 'array', 'map'),
'files' => array('include\functions_metadata.inc.php (get_exif_data)'),
),
array(
@@ -123,126 +123,126 @@ array(
array(
'name' => 'get_admin_advanced_features_links',
'type' => 'trigger_event',
- 'vars' => array('array' => 'advanced_features'),
+ 'vars' => array('array', 'advanced_features'),
'files' => array('admin\maintenance.php'),
),
array(
'name' => 'get_admin_plugin_menu_links',
'type' => 'trigger_event',
- 'vars' => array('array' => ''),
+ 'vars' => array('array', null),
'files' => array('admin.php'),
'infos' => 'use this trigger to add links into admin plugins menu',
),
array(
'name' => 'get_admins_site_links',
'type' => 'trigger_event',
- 'vars' => array('array' => 'plugin_links', 'int' => 'site_id', 'bool' => 'is_remote'),
+ 'vars' => array('array', 'plugin_links', 'int', 'site_id', 'bool', 'is_remote'),
'files' => array('admin\site_manager.php'),
),
array(
'name' => 'get_batch_manager_prefilters',
'type' => 'trigger_event',
- 'vars' => array('array' => 'prefilters'),
+ 'vars' => array('array', 'prefilters'),
'files' => array('admin\batch_manager_global.php'),
'infos' => 'use this trigger to add prefilters into batch manager global',
),
array(
'name' => 'get_categories_menu_sql_where',
'type' => 'trigger_event',
- 'vars' => array('string' => 'where', 'bool' => 'user_expand', 'bool' => 'filter_enabled'),
+ 'vars' => array('string', 'where', 'bool', 'user_expand', 'bool', 'filter_enabled'),
'files' => array('include\functions_category.inc.php (get_categories_menu)'),
),
array(
'name' => 'get_category_preferred_image_orders',
'type' => 'trigger_event',
- 'vars' => array('array' => ''),
+ 'vars' => array('array', null),
'files' => array('include\functions_category.inc.php (get_category_preferred_image_orders)'),
),
array(
'name' => 'get_download_url',
'type' => 'trigger_event',
- 'vars' => array('string' => 'url', 'array' => 'element_info'),
+ 'vars' => array('string', 'url', 'array', 'element_info'),
'files' => array('include\functions_picture.inc.php (get_download_url'),
),
array(
'name' => 'get_element_metadata_available',
'type' => 'trigger_event',
- 'vars' => array('bool' => '', 'string' => 'element_path'),
+ 'vars' => array('bool', null, 'string', 'element_path'),
'files' => array('picture.php'),
),
array(
'name' => 'get_element_url',
'type' => 'trigger_event',
- 'vars' => array('string' => 'url', 'array' => 'element_info'),
+ 'vars' => array('string', 'url', 'array', 'element_info'),
'files' => array('include\functions_picture.inc.php (get_element_url)'),
),
array(
'name' => 'get_high_location',
'type' => 'trigger_event',
- 'vars' => array('string' => 'location', 'array' => 'element_info'),
+ 'vars' => array('string', 'location', 'array', 'element_info'),
'files' => array('include\functions_picture.inc.php (get_high_location)'),
),
array(
'name' => 'get_high_url',
'type' => 'trigger_event',
- 'vars' => array('string' => 'url', 'array' => 'element_info'),
+ 'vars' => array('string', 'url', 'array', 'element_info'),
'files' => array('include\functions_picture.inc.php (get_high_url)'),
),
array(
'name' => 'get_history',
'type' => 'trigger_event',
- 'vars' => array('array' => '', 'array' => 'page_search', 'array' => 'types'),
+ 'vars' => array('array', null, 'array', 'page_search', 'array', 'types'),
'files' => array('admin\history.php'),
),
array(
'name' => 'get_image_location',
'type' => 'trigger_event',
- 'vars' => array('string' => 'path', 'array' => 'element_info'),
+ 'vars' => array('string', 'path', 'array', 'element_info'),
'files' => array('include\functions_picture.inc.php (get_image_location)'),
),
array(
'name' => 'get_popup_help_content',
'type' => 'trigger_event',
- 'vars' => array('string' => 'help_content', 'string' => 'page'),
+ 'vars' => array('string', 'help_content', 'string', 'page'),
'files' => array('admin\popuphelp.php', 'popuphelp.php'),
),
array(
'name' => 'get_pwg_themes',
'type' => 'trigger_event',
- 'vars' => array('array' => 'themes'),
+ 'vars' => array('array', 'themes'),
'files' => array('include\functions.inc.php (get_pwg_themes)'),
),
array(
'name' => 'get_thumbnail_title',
'type' => 'trigger_event',
- 'vars' => array('string' => 'title', 'array' => 'info'),
+ 'vars' => array('string', 'title', 'array', 'info'),
'files' => array('include\functions.inc.php (get_thumbnail_title)'),
),
array(
'name' => 'get_comments_derivative_params',
'type' => 'trigger_event',
- 'vars' => array('ImageStdParams' => null),
+ 'vars' => array('ImageStdParams', null),
'files' => array('comments.php'),
'infos' => 'New in 2.4',
),
array(
'name' => 'get_index_album_derivative_params',
'type' => 'trigger_event',
- 'vars' => array('ImageStdParams' => null),
+ 'vars' => array('ImageStdParams', null),
'files' => array('includecategory_cats.php', 'include\category_default.inc.php'),
'infos' => 'New in 2.4',
),
array(
'name' => 'get_src_image_url',
'type' => 'trigger_event',
- 'vars' => array('string' => 'url', 'SrcImage' => 'this'),
+ 'vars' => array('string', 'url', 'SrcImage', 'this'),
'files' => array('include\derivative.inc.php (SrcImage::__construct)'),
'infos' => 'New in 2.4',
),
array(
'name' => 'get_derivative_url',
'type' => 'trigger_event',
- 'vars' => array('string' => 'url', 'ImageStdParams' => null, 'SrcImage' => 'this', 'string' => 'rel_url'),
+ 'vars' => array('string', 'url', 'ImageStdParams', null, 'SrcImage', 'this', 'string', 'rel_url'),
'files' => array('include\derivative.inc.php (SrcImage::url, SrcImage::get_url)'),
'infos' => 'New in 2.4',
),
@@ -256,25 +256,25 @@ array(
array(
'name' => 'invalidate_user_cache',
'type' => 'trigger_action',
- 'vars' => array('bool' => 'full'),
+ 'vars' => array('bool', 'full'),
'files' => array('admin\include\functions.inc.php (invalidate_user_cache)'),
),
array(
'name' => 'list_check_integrity',
'type' => 'trigger_action',
- 'vars' => array('object' => 'this'),
+ 'vars' => array('object', 'this'),
'files' => array('admin\include\check_integrity.class.php (check_integrity::check)'),
),
array(
'name' => 'load_image_library',
'type' => 'trigger_action',
- 'vars' => array('object' => 'this'),
+ 'vars' => array('object', 'this'),
'files' => array('admin\include\image.class.php (pwg_image::__construct)'),
),
array(
'name' => 'load_profile_in_template',
'type' => 'trigger_action',
- 'vars' => array('array' => 'userdata'),
+ 'vars' => array('array', 'userdata'),
'files' => array('profile.php (load_profile_in_template)'),
),
array(
@@ -340,13 +340,13 @@ array(
array(
'name' => 'loc_begin_index_category_thumbnails',
'type' => 'trigger_action',
- 'vars' => array('array' => 'categories'),
+ 'vars' => array('array', 'categories'),
'files' => array('include\category_cats.inc.php'),
),
array(
'name' => 'loc_begin_index_thumbnails',
'type' => 'trigger_action',
- 'vars' => array('array' => 'pictures'),
+ 'vars' => array('array', 'pictures'),
'files' => array('include\category_default.inc.php'),
),
array(
@@ -412,13 +412,13 @@ array(
array(
'name' => 'loc_end_index_category_thumbnails',
'type' => 'trigger_event',
- 'vars' => array('array' => 'tpl_thumbnails_var', 'array' => 'categories'),
+ 'vars' => array('array', 'tpl_thumbnails_var', 'array', 'categories'),
'files' => array('include\category_cats.inc.php'),
),
array(
'name' => 'loc_end_index_thumbnails',
'type' => 'trigger_event',
- 'vars' => array('array' => 'tpl_thumbnails_var', 'array' => 'pictures'),
+ 'vars' => array('array', 'tpl_thumbnails_var', 'array', 'pictures'),
'files' => array('include\category_default.inc.php'),
),
array(
@@ -455,25 +455,25 @@ array(
array(
'name' => 'loc_visible_user_list',
'type' => 'trigger_event',
- 'vars' => array('array' => 'visible_user_list'),
+ 'vars' => array('array', 'visible_user_list'),
'files' => array('admin\user_list.php'),
),
array(
'name' => 'login_failure',
'type' => 'trigger_action',
- 'vars' => array('string' => 'username'),
+ 'vars' => array('string', 'username'),
'files' => array('include\functions_user.inc.php (try_log_user)'),
),
array(
'name' => 'login_success',
'type' => 'trigger_action',
- 'vars' => array('string' => 'username'),
+ 'vars' => array('string', 'username'),
'files' => array('include\functions_user.inc.php (auto_login, try_log_user)'),
),
array(
'name' => 'mail_group_assign_vars',
'type' => 'trigger_event',
- 'vars' => array('array' => 'assign_vars'),
+ 'vars' => array('array', 'assign_vars'),
'files' => array('include\functions_mail.inc.php (pwg_mail_group)'),
),
array(
@@ -485,25 +485,25 @@ array(
array(
'name' => 'nbm_render_global_customize_mail_content',
'type' => 'trigger_event',
- 'vars' => array('string' => 'customize_mail_content'),
+ 'vars' => array('string', 'customize_mail_content'),
'files' => array('admin\notification_by_mail.php (do_action_send_mail_notification)'),
),
array(
'name' => 'nbm_render_user_customize_mail_content',
'type' => 'trigger_event',
- 'vars' => array('string' => 'customize_mail_content', 'string' => 'nbm_user'),
+ 'vars' => array('string', 'customize_mail_content', 'string', 'nbm_user'),
'files' => array('admin\notification_by_mail.php (do_action_send_mail_notification)'),
),
array(
'name' => 'perform_batch_manager_prefilters',
'type' => 'trigger_event',
- 'vars' => array('array' => 'filter_sets', 'string' => 'session_prefilter'),
+ 'vars' => array('array', 'filter_sets', 'string', 'session_prefilter'),
'files' => array('admin\batch_manager.php'),
),
array(
'name' => 'picture_pictures_data',
'type' => 'trigger_event',
- 'vars' => array('array' => 'picture'),
+ 'vars' => array('array', 'picture'),
'files' => array('picture.php'),
),
array(
@@ -515,184 +515,191 @@ array(
array(
'name' => 'pwg_log_allowed',
'type' => 'trigger_event',
- 'vars' => array('bool' => 'do_log', 'int' => 'image_id', 'string' => 'image_type'),
+ 'vars' => array('bool', 'do_log', 'int', 'image_id', 'string', 'image_type'),
'files' => array('include\functions.inc.php (pwg_log)'),
),
array(
'name' => 'register_user',
'type' => 'trigger_action',
- 'vars' => array('array' => 'user'),
+ 'vars' => array('array', 'user'),
'files' => array('include\functions_user.inc.php (register_user)'),
),
array(
'name' => 'register_user_check',
'type' => 'trigger_event',
- 'vars' => array('array' => 'errors', 'array' => 'user'),
+ 'vars' => array('array', 'errors', 'array', 'user'),
'files' => array('include\functions_user.inc.php (register_user)'),
),
array(
'name' => 'render_category_description',
'type' => 'trigger_event',
- 'vars' => array('string' => 'category_description', 'string' => 'action'),
+ 'vars' => array('string', 'category_description', 'string', 'action'),
'files' => array('include\category_cats.inc.php', 'include\section_init.inc.php', 'include\ws_functions.inc.php (ws_categories_getList, ws_categories_getAdminList)'),
),
array(
'name' => 'render_category_literal_description',
'type' => 'trigger_event',
- 'vars' => array('string' => 'category_description'),
+ 'vars' => array('string', 'category_description'),
'files' => array('include\category_cats.inc.php'),
),
array(
'name' => 'render_category_name',
'type' => 'trigger_event',
- 'vars' => array('string' => 'category_name', 'string' => 'location'),
+ 'vars' => array('string', 'category_name', 'string', 'location'),
'files' => array('admin\cat_list.php', 'include\ws_functions.inc.php (ws_categories_getList, ws_categories_getAdminList, ws_categories_move)'),
),
array(
'name' => 'render_comment_author',
'type' => 'trigger_event',
- 'vars' => array('string' => 'comment_author'),
+ 'vars' => array('string', 'comment_author'),
'files' => array('admin\comments.php', 'comments.php', 'include\picture_comment.inc.php'),
),
array(
'name' => 'render_comment_content',
'type' => 'trigger_event',
- 'vars' => array('string' => 'comment_content'),
+ 'vars' => array('string', 'comment_content'),
'files' => array('admin\comments.php', 'comments.php', 'include\picture_comment.inc.php'),
),
array(
'name' => 'render_element_content',
'type' => 'trigger_event',
- 'vars' => array('string' => 'content', 'array' => 'current_picture'),
+ 'vars' => array('string', 'content', 'array', 'current_picture'),
'files' => array('picture.php'),
),
array(
'name' => 'render_element_description',
'type' => 'trigger_event',
- 'vars' => array('string' => 'element_name'),
+ 'vars' => array('string', 'element_name'),
'files' => array('include\functions.inc.php (get_picture_title)', 'picture.php'),
),
array(
'name' => 'render_lost_password_mail_content',
'type' => 'trigger_event',
- 'vars' => array('string' => 'message'),
+ 'vars' => array('string', 'message'),
'files' => array('password.php (process_password_request)'),
),
array(
'name' => 'render_page_banner',
'type' => 'trigger_event',
- 'vars' => array('string' => 'gallery_title'),
+ 'vars' => array('string', 'gallery_title'),
'files' => array('include\page_header.php'),
),
array(
'name' => 'render_tag_name',
'type' => 'trigger_event',
- 'vars' => array('string' => 'tag_name'),
+ 'vars' => array('string', 'tag_name'),
'files' => array('include\functions.php (get_taglist)', 'admin\tags.php', 'include\functions_tag.inc.php (get_available_tags, get_all_tags, get_common_tags)', 'index.php'),
),
array(
'name' => 'render_tag_url',
'type' => 'trigger_event',
- 'vars' => array('string' => 'tag_name'),
+ 'vars' => array('string', 'tag_name'),
'files' => array('include\functions.php (tag_id_from_tag_name, create_tag)', 'admin\tags.php'),
),
array(
'name' => 'save_profile_from_post',
'type' => 'trigger_action',
- 'vars' => array('int' => 'user_id'),
+ 'vars' => array('int', 'user_id'),
'files' => array('profile.php (save_profile_from_post)'),
),
array(
'name' => 'send_mail',
'type' => 'trigger_event',
- 'vars' => array('bool' => 'result', 'string' => 'mail_to', 'string' => 'mail_subject', 'string' => 'mail_content', 'array' => 'mail_headers'),
+ 'vars' => array('bool', 'result', 'string', 'mail_to', 'string', 'mail_subject', 'string', 'mail_content', 'array', 'mail_headers'),
'files' => array('include\functions_mail.inc.php (pwg_mail)'),
),
array(
'name' => 'send_mail_content',
'type' => 'trigger_event',
- 'vars' => array('string' => 'content'),
+ 'vars' => array('string', 'content'),
'files' => array('include\functions_mail.inc.php (pwg_mail)'),
),
array(
'name' => 'send_mail_headers',
'type' => 'trigger_event',
- 'vars' => array('array' => 'headers'),
+ 'vars' => array('array', 'headers'),
'files' => array('include\functions_mail.inc.php (pwg_mail)'),
),
array(
'name' => 'send_mail_subject',
'type' => 'trigger_event',
- 'vars' => array('string' => 'cvt_subject'),
+ 'vars' => array('string', 'cvt_subject'),
'files' => array('include\functions_mail.inc.php (pwg_mail)'),
),
array(
'name' => 'send_mail_to',
'type' => 'trigger_event',
- 'vars' => array('string' => 'to'),
+ 'vars' => array('string', 'to'),
'files' => array('include\functions_mail.inc.php (pwg_mail)'),
),
array(
'name' => 'sendResponse',
'type' => 'trigger_action',
- 'vars' => array('string' => 'encodedResponse'),
+ 'vars' => array('string', 'encodedResponse'),
'files' => array('include\ws_core.inc.php (PwgServer::sendResponse)'),
),
array(
'name' => 'set_status_header',
'type' => 'trigger_action',
- 'vars' => array('int' => 'code', 'string' => 'text'),
+ 'vars' => array('int', 'code', 'string', 'text'),
'files' => array('include\functions_html.inc.php (set_status_header)'),
),
array(
+ 'name' => 'tabsheet_before_select',
+ 'type' => 'trigger_event',
+ 'vars' => array('array', 'sheets', 'string', 'tabsheet_id'),
+ 'files' => array('include\tabsheet.class.php (tabsheet::select)'),
+ 'infos' => 'New in 2.4, use this trigger to add tabs to a tabsheets',
+),
+array(
'name' => 'trigger',
'type' => 'trigger_action',
- 'vars' => array('array' => ''),
+ 'vars' => array('array', null),
'files' => array('include\functions_plugins.inc.php (trigger_event, trigger_action)'),
),
array(
'name' => 'user_comment_check',
'type' => 'trigger_event',
- 'vars' => array('string' => 'comment_action', 'array' => 'comm'),
+ 'vars' => array('string', 'comment_action', 'array', 'comm'),
'files' => array('include\functions_comment.inc.php (insert_user_comment, update_user_comment)'),
'infos' => 'use this trigger to add conditions on comment validation',
),
array(
'name' => 'user_comment_deletion',
'type' => 'trigger_action',
- 'vars' => array('mixed' => 'comment_id'),
+ 'vars' => array('mixed', 'comment_id'),
'files' => array('include\functions_comment.inc.php (delete_user_comment)'),
'infos' => '$comment_id is and int or an array of int',
),
array(
'name' => 'user_comment_insertion',
'type' => 'trigger_action',
- 'vars' => array('array' => 'comm'),
+ 'vars' => array('array', 'comm'),
'files' => array('include\picture_comment.inc.php'),
),
array(
'name' => 'user_comment_validation',
'type' => 'trigger_action',
- 'vars' => array('mixed' => 'comment_id'),
+ 'vars' => array('mixed', 'comment_id'),
'files' => array('include\functions_comment.inc.php (validate_user_comment)'),
'infos' => '$comment_id is and int or an array of int',
),
array(
'name' => 'user_init',
'type' => 'trigger_action',
- 'vars' => array('array' => 'user'),
+ 'vars' => array('array', 'user'),
'files' => array('include\user.inc.php'),
),
array(
'name' => 'ws_add_methods',
'type' => 'trigger_action',
- 'vars' => array('object' => 'this'),
+ 'vars' => array('object', 'this'),
'files' => array('include\ws_core.inc.php (PwgServer::run)'),
),
array(
'name' => 'ws_invoke_allowed',
'type' => 'trigger_event',
- 'vars' => array('bool' => '', 'string' => 'methodName', 'array' => 'params'),
+ 'vars' => array('bool', null, 'string', 'methodName', 'array', 'params'),
'files' => array('include\ws_core.inc.php (PwgServer::invoke)'),
),
);
@@ -743,11 +750,10 @@ array(
<td>'.$trigger['name'].'</td>
<td>'.$trigger['type'].'</td>
<td>';
- $f=1;
- foreach ($trigger['vars'] as $type => $name)
+ for ($i=0; $i<count($trigger['vars']); $i+=2)
{
- if (!$f) echo ', '; $f=0;
- echo $type.' '.(!empty($name)?'<i>$'.$name.'</i>':'');
+ if ($i>0) echo ', ';
+ echo $trigger['vars'][$i].' '.(!empty($trigger['vars'][$i+1])?'<i>$'.$trigger['vars'][$i+1].'</i>':null);
}
echo '
</td>