mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
feature 3010 : replace trigger_action/event by trigger_notify/change
git-svn-id: http://piwigo.org/svn/trunk@28587 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
f98edc7a2e
commit
4bd32005b5
62 changed files with 322 additions and 344 deletions
|
@ -37,7 +37,7 @@ check_status(ACCESS_GUEST);
|
|||
$title= l10n('About Piwigo');
|
||||
$page['body_id'] = 'theAboutPage';
|
||||
|
||||
trigger_action('loc_begin_about');
|
||||
trigger_notify('loc_begin_about');
|
||||
|
||||
$template->set_filename('about', 'about.tpl');
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|||
include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/add_core_tabs.inc.php');
|
||||
|
||||
trigger_action('loc_begin_admin');
|
||||
trigger_notify('loc_begin_admin');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Check Access and exit when user status is not ok |
|
||||
|
@ -244,7 +244,7 @@ if ($nb_photos_in_caddie > 0)
|
|||
// | Plugin menu |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$plugin_menu_links = trigger_event('get_admin_plugin_menu_links', array() );
|
||||
$plugin_menu_links = trigger_change('get_admin_plugin_menu_links', array() );
|
||||
|
||||
function UC_name_compare($a, $b)
|
||||
{
|
||||
|
@ -284,7 +284,7 @@ if (
|
|||
// | Include specific page |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
trigger_action('loc_begin_admin_page');
|
||||
trigger_notify('loc_begin_admin_page');
|
||||
include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php');
|
||||
|
||||
$template->assign('ACTIVE_MENU', get_active_menu($page['page']));
|
||||
|
@ -298,7 +298,7 @@ $template->assign( 'pwgmenu', pwg_URL() );
|
|||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
|
||||
trigger_action('loc_end_admin');
|
||||
trigger_notify('loc_end_admin');
|
||||
|
||||
flush_page_messages();
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ SELECT id, file, path, representative_ext
|
|||
pwg_mail_group(
|
||||
$_POST['group'],
|
||||
array(
|
||||
'subject' => l10n('[%s] Visit album %s', $conf['gallery_title'], trigger_event('render_category_name', $category['name'], 'admin_cat_list')),
|
||||
'subject' => l10n('[%s] Visit album %s', $conf['gallery_title'], trigger_change('render_category_name', $category['name'], 'admin_cat_list')),
|
||||
// TODO : change this language variable to 'Visit album %s'
|
||||
// TODO : 'language_selected' => ....
|
||||
),
|
||||
|
@ -91,11 +91,11 @@ SELECT id, file, path, representative_ext
|
|||
'filename' => 'cat_group_info',
|
||||
'assign' => array(
|
||||
'IMG_URL' => $img_url,
|
||||
'CAT_NAME' => trigger_event('render_category_name', $category['name'], 'admin_cat_list'),
|
||||
'CAT_NAME' => trigger_change('render_category_name', $category['name'], 'admin_cat_list'),
|
||||
'LINK' => make_index_url(array(
|
||||
'category' => array(
|
||||
'id' => $category['id'],
|
||||
'name' => trigger_event('render_category_name', $category['name'], 'admin_cat_list'),
|
||||
'name' => trigger_change('render_category_name', $category['name'], 'admin_cat_list'),
|
||||
'permalink' => $category['permalink']
|
||||
)
|
||||
)),
|
||||
|
|
|
@ -301,7 +301,7 @@ SELECT id
|
|||
break;
|
||||
}
|
||||
|
||||
$filter_sets = trigger_event('perform_batch_manager_prefilters', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']);
|
||||
$filter_sets = trigger_change('perform_batch_manager_prefilters', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']);
|
||||
}
|
||||
|
||||
if (isset($_SESSION['bulk_manager_filter']['category']))
|
||||
|
|
|
@ -40,7 +40,7 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|||
|
||||
check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
trigger_action('loc_begin_element_set_global');
|
||||
trigger_notify('loc_begin_element_set_global');
|
||||
|
||||
check_input_parameter('del_tags', $_POST, true, PATTERN_ID);
|
||||
check_input_parameter('associate', $_POST, false, PATTERN_ID);
|
||||
|
@ -404,7 +404,7 @@ DELETE
|
|||
}
|
||||
}
|
||||
|
||||
trigger_action('element_set_global_action', $action, $collection);
|
||||
trigger_notify('element_set_global_action', $action, $collection);
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
@ -429,7 +429,7 @@ if ($conf['enable_synchronization'])
|
|||
$prefilters[] = array('ID' => 'no_virtual_album', 'NAME' => l10n('With no virtual album'));
|
||||
}
|
||||
|
||||
$prefilters = trigger_event('get_batch_manager_prefilters', $prefilters);
|
||||
$prefilters = trigger_change('get_batch_manager_prefilters', $prefilters);
|
||||
usort($prefilters, 'UC_name_compare');
|
||||
|
||||
$template->assign(
|
||||
|
@ -674,7 +674,7 @@ $template->assign(array(
|
|||
'CACHE_KEYS' => get_admin_client_cache_keys(array('tags', 'categories')),
|
||||
));
|
||||
|
||||
trigger_action('loc_end_element_set_global');
|
||||
trigger_notify('loc_end_element_set_global');
|
||||
|
||||
//----------------------------------------------------------- sending html code
|
||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'batch_manager_global');
|
||||
|
|
|
@ -39,7 +39,7 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
trigger_action('loc_begin_element_set_unit');
|
||||
trigger_notify('loc_begin_element_set_unit');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | unit mode form submission |
|
||||
|
@ -254,7 +254,7 @@ SELECT
|
|||
));
|
||||
}
|
||||
|
||||
trigger_action('loc_end_element_set_unit');
|
||||
trigger_notify('loc_end_element_set_unit');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | sending html code |
|
||||
|
|
|
@ -33,7 +33,7 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
trigger_action('loc_begin_cat_list');
|
||||
trigger_notify('loc_begin_cat_list');
|
||||
|
||||
if (!empty($_POST) or isset($_GET['delete']))
|
||||
{
|
||||
|
@ -324,7 +324,7 @@ foreach ($categories as $category)
|
|||
$tpl_cat =
|
||||
array(
|
||||
'NAME' =>
|
||||
trigger_event(
|
||||
trigger_change(
|
||||
'render_category_name',
|
||||
$category['name'],
|
||||
'admin_cat_list'
|
||||
|
@ -363,7 +363,7 @@ foreach ($categories as $category)
|
|||
$template->append('categories', $tpl_cat);
|
||||
}
|
||||
|
||||
trigger_action('loc_end_cat_list');
|
||||
trigger_notify('loc_end_cat_list');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | sending html code |
|
||||
|
|
|
@ -103,7 +103,7 @@ SELECT galleries_url
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
trigger_action('loc_begin_cat_modify');
|
||||
trigger_notify('loc_begin_cat_modify');
|
||||
|
||||
//---------------------------------------------------------------- verification
|
||||
if ( !isset( $_GET['cat_id'] ) || !is_numeric( $_GET['cat_id'] ) )
|
||||
|
@ -368,7 +368,7 @@ if ($category['is_virtual'])
|
|||
$template->assign('parent_category', empty($category['id_uppercat']) ? array() : array($category['id_uppercat']));
|
||||
}
|
||||
|
||||
trigger_action('loc_end_cat_modify');
|
||||
trigger_notify('loc_end_cat_modify');
|
||||
|
||||
//----------------------------------------------------------- sending html code
|
||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'album_properties');
|
||||
|
|
|
@ -200,9 +200,9 @@ while ($row = pwg_db_fetch_assoc($result))
|
|||
'U_PICTURE' => get_root_url().'admin.php?page=photo-'.$row['image_id'],
|
||||
'ID' => $row['id'],
|
||||
'TN_SRC' => $thumb,
|
||||
'AUTHOR' => trigger_event('render_comment_author', $author_name),
|
||||
'AUTHOR' => trigger_change('render_comment_author', $author_name),
|
||||
'DATE' => format_date($row['date'], true),
|
||||
'CONTENT' => trigger_event('render_comment_content',$row['content']),
|
||||
'CONTENT' => trigger_change('render_comment_content',$row['content']),
|
||||
'IS_PENDING' => ('false' == $row['validated']),
|
||||
)
|
||||
);
|
||||
|
|
|
@ -46,7 +46,7 @@ $tabsheet->set_id('help');
|
|||
$tabsheet->select($selected);
|
||||
$tabsheet->assign();
|
||||
|
||||
trigger_action('loc_end_help');
|
||||
trigger_notify('loc_end_help');
|
||||
|
||||
$template->set_filenames(array('help' => 'help.tpl'));
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ INSERT INTO '.SEARCH_TABLE.'
|
|||
}
|
||||
|
||||
/*TODO - no need to get a huge number of rows from db (should take only what needed for display + SQL_CALC_FOUND_ROWS*/
|
||||
$data = trigger_event('get_history', array(), $page['search'], $types);
|
||||
$data = trigger_change('get_history', array(), $page['search'], $types);
|
||||
usort($data, 'history_compare');
|
||||
|
||||
$page['nb_lines'] = count($data);
|
||||
|
@ -316,7 +316,7 @@ SELECT
|
|||
$result = pwg_query($query);
|
||||
while ($row=pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$name_of_tag[ $row['id'] ] = '<a href="'.make_index_url( array('tags'=>array($row))).'">'.trigger_event("render_tag_name", $row['name'], $row).'</a>';
|
||||
$name_of_tag[ $row['id'] ] = '<a href="'.make_index_url( array('tags'=>array($row))).'">'.trigger_change("render_tag_name", $row['name'], $row).'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ SELECT
|
|||
|
||||
if (isset($image_infos[$line['image_id']]['label']))
|
||||
{
|
||||
$image_title.= ' '.trigger_event('render_element_description', $image_infos[$line['image_id']]['label']);
|
||||
$image_title.= ' '.trigger_change('render_element_description', $image_infos[$line['image_id']]['label']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -66,7 +66,7 @@ class check_integrity
|
|||
$this->retrieve_list = array();
|
||||
$this->build_ignore_list = array();
|
||||
|
||||
trigger_action('list_check_integrity', $this);
|
||||
trigger_notify('list_check_integrity', $this);
|
||||
|
||||
// Information
|
||||
if (count($this->retrieve_list) > 0)
|
||||
|
|
|
@ -162,7 +162,7 @@ DELETE FROM '.USER_CACHE_CATEGORIES_TABLE.'
|
|||
WHERE cat_id IN ('.implode(',',$ids).')';
|
||||
pwg_query($query);
|
||||
|
||||
trigger_action('delete_categories', $ids);
|
||||
trigger_notify('delete_categories', $ids);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -250,7 +250,7 @@ function delete_elements($ids, $physical_deletion=false)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
trigger_action('begin_delete_elements', $ids);
|
||||
trigger_notify('begin_delete_elements', $ids);
|
||||
|
||||
if ($physical_deletion)
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ SELECT
|
|||
update_category($category_ids);
|
||||
}
|
||||
|
||||
trigger_action('delete_elements', $ids);
|
||||
trigger_notify('delete_elements', $ids);
|
||||
return count($ids);
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ DELETE FROM '.USERS_TABLE.'
|
|||
;';
|
||||
pwg_query($query);
|
||||
|
||||
trigger_action('delete_user', $user_id);
|
||||
trigger_notify('delete_user', $user_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1573,7 +1573,7 @@ SELECT id
|
|||
;';
|
||||
if (count($existing_tags = array_from_query($query, 'id')) == 0)
|
||||
{
|
||||
$url_name = trigger_event('render_tag_url', $tag_name);
|
||||
$url_name = trigger_change('render_tag_url', $tag_name);
|
||||
// search existing by url name
|
||||
$query = '
|
||||
SELECT id
|
||||
|
@ -1841,7 +1841,7 @@ UPDATE '.USER_CACHE_TABLE.'
|
|||
SET need_update = \'true\';';
|
||||
pwg_query($query);
|
||||
}
|
||||
trigger_action('invalidate_user_cache', $full);
|
||||
trigger_notify('invalidate_user_cache', $full);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1976,7 +1976,7 @@ SELECT id
|
|||
TAGS_TABLE,
|
||||
array(
|
||||
'name' => $tag_name,
|
||||
'url_name' => trigger_event('render_tag_url', $tag_name),
|
||||
'url_name' => trigger_change('render_tag_url', $tag_name),
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -2326,7 +2326,7 @@ function get_taglist($query, $only_user_language=true)
|
|||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$raw_name = $row['name'];
|
||||
$name = trigger_event('render_tag_name', $raw_name, $row);
|
||||
$name = trigger_change('render_tag_name', $raw_name, $row);
|
||||
|
||||
$taglist[] = array(
|
||||
'name' => $name,
|
||||
|
@ -2335,7 +2335,7 @@ function get_taglist($query, $only_user_language=true)
|
|||
|
||||
if (!$only_user_language)
|
||||
{
|
||||
$alt_names = trigger_event('get_tag_alt_names', array(), $raw_name);
|
||||
$alt_names = trigger_change('get_tag_alt_names', array(), $raw_name);
|
||||
|
||||
foreach( array_diff( array_unique($alt_names), array($name) ) as $alt)
|
||||
{
|
||||
|
|
|
@ -177,6 +177,6 @@ SELECT
|
|||
}
|
||||
|
||||
add_event_handler('get_history', 'get_history', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
|
||||
trigger_action('functions_history_included');
|
||||
trigger_notify('functions_history_included');
|
||||
|
||||
?>
|
|
@ -64,7 +64,7 @@ class pwg_image
|
|||
{
|
||||
$this->source_filepath = $source_filepath;
|
||||
|
||||
trigger_action('load_image_library', array(&$this) );
|
||||
trigger_notify('load_image_library', array(&$this) );
|
||||
|
||||
if (is_object($this->image))
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ class tabsheet
|
|||
*/
|
||||
function select($name)
|
||||
{
|
||||
$this->sheets = trigger_event('tabsheet_before_select', $this->sheets, $this->uniqid);
|
||||
$this->sheets = trigger_change('tabsheet_before_select', $this->sheets, $this->uniqid);
|
||||
if (!array_key_exists($name, $this->sheets))
|
||||
{
|
||||
$keys = array_keys($this->sheets);
|
||||
|
|
|
@ -220,7 +220,7 @@ else
|
|||
$advanced_features = array();
|
||||
|
||||
//$advanced_features is array of array composed of CAPTION & URL
|
||||
$advanced_features = trigger_event(
|
||||
$advanced_features = trigger_change(
|
||||
'get_admin_advanced_features_links',
|
||||
$advanced_features
|
||||
);
|
||||
|
|
|
@ -253,7 +253,7 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l
|
|||
}
|
||||
|
||||
$customize_mail_content =
|
||||
trigger_event('nbm_render_global_customize_mail_content', $customize_mail_content);
|
||||
trigger_change('nbm_render_global_customize_mail_content', $customize_mail_content);
|
||||
|
||||
|
||||
// Prepare message after change language
|
||||
|
@ -340,7 +340,7 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l
|
|||
}
|
||||
|
||||
$nbm_user_customize_mail_content =
|
||||
trigger_event('nbm_render_user_customize_mail_content',
|
||||
trigger_change('nbm_render_user_customize_mail_content',
|
||||
$customize_mail_content, $nbm_user);
|
||||
if (!empty($nbm_user_customize_mail_content))
|
||||
{
|
||||
|
@ -482,7 +482,7 @@ check_status(get_tab_status($page['mode']));
|
|||
// | Add event handler |
|
||||
// +-----------------------------------------------------------------------+
|
||||
add_event_handler('nbm_render_global_customize_mail_content', 'render_global_customize_mail_content');
|
||||
trigger_action('nbm_event_handler_added');
|
||||
trigger_notify('nbm_event_handler_added');
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
|
|
@ -415,7 +415,7 @@ $template->assign(array(
|
|||
'CACHE_KEYS' => get_admin_client_cache_keys(array('tags', 'categories')),
|
||||
));
|
||||
|
||||
trigger_action('loc_end_picture_modify');
|
||||
trigger_notify('loc_end_picture_modify');
|
||||
|
||||
//----------------------------------------------------------- sending html code
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ if
|
|||
$help_content = '';
|
||||
}
|
||||
|
||||
$help_content = trigger_event(
|
||||
$help_content = trigger_change(
|
||||
'get_popup_help_content', $help_content, $_GET['page']);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -176,7 +176,7 @@ while ($row = pwg_db_fetch_assoc($result))
|
|||
$plugin_links = array();
|
||||
//$plugin_links is array of array composed of U_HREF, U_HINT & U_CAPTION
|
||||
$plugin_links =
|
||||
trigger_event('get_admins_site_links',
|
||||
trigger_change('get_admins_site_links',
|
||||
$plugin_links, $row['id'], $is_remote);
|
||||
$tpl_var['plugin_links'] = $plugin_links;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ SELECT id, name
|
|||
$updates[] = array(
|
||||
'id' => $tag_id,
|
||||
'name' => addslashes($tag_name),
|
||||
'url_name' => trigger_event('render_tag_url', $tag_name),
|
||||
'url_name' => trigger_change('render_tag_url', $tag_name),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ SELECT id, name
|
|||
TAGS_TABLE,
|
||||
array(
|
||||
'name' => $tag_name,
|
||||
'url_name' => trigger_event('render_tag_url', $tag_name),
|
||||
'url_name' => trigger_change('render_tag_url', $tag_name),
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -218,7 +218,7 @@ SELECT
|
|||
$result = pwg_query($query);
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$name_of_tag[ $row['id'] ] = trigger_event('render_tag_name', $row['name'], $row);
|
||||
$name_of_tag[ $row['id'] ] = trigger_change('render_tag_name', $row['name'], $row);
|
||||
}
|
||||
|
||||
$tag_ids_to_delete = array_diff(
|
||||
|
@ -358,7 +358,7 @@ $orphan_tags = get_orphan_tags();
|
|||
$orphan_tag_names = array();
|
||||
foreach ($orphan_tags as $tag)
|
||||
{
|
||||
$orphan_tag_names[] = trigger_event('render_tag_name', $tag['name'], $tag);
|
||||
$orphan_tag_names[] = trigger_change('render_tag_name', $tag['name'], $tag);
|
||||
}
|
||||
|
||||
if (count($orphan_tag_names) > 0)
|
||||
|
@ -393,12 +393,12 @@ $all_tags = array();
|
|||
while ($tag = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$raw_name = $tag['name'];
|
||||
$tag['name'] = trigger_event('render_tag_name', $raw_name, $tag);
|
||||
$tag['name'] = trigger_change('render_tag_name', $raw_name, $tag);
|
||||
$tag['counter'] = intval(@$tag_counters[ $tag['id'] ]);
|
||||
$tag['U_VIEW'] = make_index_url(array('tags'=>array($tag)));
|
||||
$tag['U_EDIT'] = 'admin.php?page=batch_manager&filter=tag-'.$tag['id'];
|
||||
|
||||
$alt_names = trigger_event('get_tag_alt_names', array(), $raw_name);
|
||||
$alt_names = trigger_change('get_tag_alt_names', array(), $raw_name);
|
||||
$alt_names = array_diff( array_unique($alt_names), array($tag['name']) );
|
||||
if (count($alt_names))
|
||||
{
|
||||
|
|
|
@ -172,7 +172,7 @@ $template->assign(
|
|||
)
|
||||
);
|
||||
|
||||
trigger_action('loc_end_themes_installed');
|
||||
trigger_notify('loc_end_themes_installed');
|
||||
|
||||
$template->set_filenames(array('themes' => 'themes_installed.tpl'));
|
||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'themes');
|
||||
|
|
10
comments.php
10
comments.php
|
@ -89,7 +89,7 @@ $since_options = array(
|
|||
'clause' => '1=1') // stupid but generic
|
||||
);
|
||||
|
||||
trigger_action('loc_begin_comments');
|
||||
trigger_notify('loc_begin_comments');
|
||||
|
||||
if (!empty($_GET['since']) && is_numeric($_GET['since']))
|
||||
{
|
||||
|
@ -483,10 +483,10 @@ SELECT *
|
|||
'U_PICTURE' => $url,
|
||||
'src_image' => $src_image,
|
||||
'ALT' => $name,
|
||||
'AUTHOR' => trigger_event('render_comment_author', $comment['author']),
|
||||
'AUTHOR' => trigger_change('render_comment_author', $comment['author']),
|
||||
'WEBSITE_URL' => $comment['website_url'],
|
||||
'DATE'=>format_date($comment['date'], true),
|
||||
'CONTENT'=>trigger_event('render_comment_content',$comment['content']),
|
||||
'CONTENT'=>trigger_change('render_comment_content',$comment['content']),
|
||||
);
|
||||
|
||||
if (is_admin())
|
||||
|
@ -543,7 +543,7 @@ SELECT *
|
|||
}
|
||||
}
|
||||
|
||||
$derivative_params = trigger_event('get_comments_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
|
||||
$derivative_params = trigger_change('get_comments_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
|
||||
$template->assign( 'derivative_params', $derivative_params );
|
||||
|
||||
// include menubar
|
||||
|
@ -557,7 +557,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theCommentsPage', $themecon
|
|||
// | html code display |
|
||||
// +-----------------------------------------------------------------------+
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_comments');
|
||||
trigger_notify('loc_end_comments');
|
||||
flush_page_messages();
|
||||
$template->pparse('comments');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
2
i.php
2
i.php
|
@ -31,7 +31,7 @@ defined('PWG_DERIVATIVE_DIR') or define('PWG_DERIVATIVE_DIR', $conf['data_locati
|
|||
@include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'config/database.inc.php');
|
||||
|
||||
|
||||
function trigger_action() {}
|
||||
function trigger_notify() {}
|
||||
function get_extension( $filename )
|
||||
{
|
||||
return substr( strrchr( $filename, '.' ), 1, strlen ( $filename ) );
|
||||
|
|
|
@ -30,7 +30,7 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_FREE);
|
||||
|
||||
trigger_action('loc_begin_identification');
|
||||
trigger_notify('loc_begin_identification');
|
||||
|
||||
//-------------------------------------------------------------- identification
|
||||
$redirect_to = '';
|
||||
|
@ -106,7 +106,7 @@ if (!$conf['gallery_locked'] && (!isset($themeconf['hide_menu_on']) OR !in_array
|
|||
|
||||
//----------------------------------------------------------- html code display
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_identification');
|
||||
trigger_notify('loc_end_identification');
|
||||
flush_page_messages();
|
||||
$template->pparse('identification');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -49,7 +49,7 @@ class BlockManager
|
|||
*/
|
||||
public function load_registered_blocks()
|
||||
{
|
||||
trigger_action('blockmanager_register_blocks', array($this));
|
||||
trigger_notify('blockmanager_register_blocks', array($this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,7 +110,7 @@ class BlockManager
|
|||
$idx++;
|
||||
}
|
||||
$this->sort_blocks();
|
||||
trigger_action('blockmanager_prepare_display', array($this));
|
||||
trigger_notify('blockmanager_prepare_display', array($this));
|
||||
$this->sort_blocks();
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ class BlockManager
|
|||
global $template;
|
||||
|
||||
$template->set_filename('menubar', $file);
|
||||
trigger_action('blockmanager_apply', array($this) );
|
||||
trigger_notify('blockmanager_apply', array($this) );
|
||||
|
||||
foreach ($this->display_blocks as $id=>$block)
|
||||
{
|
||||
|
|
|
@ -269,7 +269,7 @@ if (count($categories) > 0)
|
|||
|
||||
$template->set_filename('index_category_thumbnails', 'mainpage_categories.tpl');
|
||||
|
||||
trigger_action('loc_begin_index_category_thumbnails', $categories);
|
||||
trigger_notify('loc_begin_index_category_thumbnails', $categories);
|
||||
|
||||
$tpl_thumbnails_var = array();
|
||||
|
||||
|
@ -280,7 +280,7 @@ if (count($categories) > 0)
|
|||
continue;
|
||||
}
|
||||
|
||||
$category['name'] = trigger_event(
|
||||
$category['name'] = trigger_change(
|
||||
'render_category_name',
|
||||
$category['name'],
|
||||
'subcatify_category_name'
|
||||
|
@ -316,8 +316,8 @@ if (count($categories) > 0)
|
|||
'<br>'
|
||||
),
|
||||
'DESCRIPTION' =>
|
||||
trigger_event('render_category_literal_description',
|
||||
trigger_event('render_category_description',
|
||||
trigger_change('render_category_literal_description',
|
||||
trigger_change('render_category_description',
|
||||
@$category['comment'],
|
||||
'subcatify_category_description')),
|
||||
'NAME' => $name,
|
||||
|
@ -367,8 +367,8 @@ if (count($categories) > 0)
|
|||
$conf['nb_categories_page']
|
||||
);
|
||||
|
||||
$derivative_params = trigger_event('get_index_album_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
|
||||
$tpl_thumbnails_var_selection = trigger_event('loc_end_index_category_thumbnails', $tpl_thumbnails_var_selection);
|
||||
$derivative_params = trigger_change('get_index_album_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
|
||||
$tpl_thumbnails_var_selection = trigger_change('loc_end_index_category_thumbnails', $tpl_thumbnails_var_selection);
|
||||
$template->assign( array(
|
||||
'maxRequests' =>$conf['max_requests'],
|
||||
'category_thumbnails' => $tpl_thumbnails_var_selection,
|
||||
|
|
|
@ -35,7 +35,7 @@ $selection = array_slice(
|
|||
$page['nb_image_page']
|
||||
);
|
||||
|
||||
$selection = trigger_event('loc_index_thumbnails_selection', $selection);
|
||||
$selection = trigger_change('loc_index_thumbnails_selection', $selection);
|
||||
|
||||
if (count($selection) > 0)
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ SELECT image_id, COUNT(*) AS nb_comments
|
|||
// template thumbnail initialization
|
||||
$template->set_filenames( array( 'index_thumbnails' => 'thumbnails.tpl',));
|
||||
|
||||
trigger_action('loc_begin_index_thumbnails', $pictures);
|
||||
trigger_notify('loc_begin_index_thumbnails', $pictures);
|
||||
$tpl_thumbnails_var = array();
|
||||
|
||||
foreach ($pictures as $row)
|
||||
|
@ -152,11 +152,11 @@ foreach ($pictures as $row)
|
|||
}
|
||||
|
||||
$template->assign( array(
|
||||
'derivative_params' => trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) ),
|
||||
'derivative_params' => trigger_change('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) ),
|
||||
'maxRequests' =>$conf['max_requests'],
|
||||
'SHOW_THUMBNAIL_CAPTION' =>$conf['show_thumbnail_caption'],
|
||||
) );
|
||||
$tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
|
||||
$tpl_thumbnails_var = trigger_change('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
|
||||
$template->assign('thumbnails', $tpl_thumbnails_var);
|
||||
|
||||
$template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails');
|
||||
|
|
|
@ -175,7 +175,7 @@ if ( is_admin() || (defined('IN_ADMIN') and IN_ADMIN) )
|
|||
{
|
||||
load_language('admin.lang');
|
||||
}
|
||||
trigger_action('loading_lang');
|
||||
trigger_notify('loading_lang');
|
||||
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
|
||||
|
||||
// only now we can set the localized username of the guest user (and not in
|
||||
|
@ -272,5 +272,5 @@ if ( !empty($conf['original_url_protection']) )
|
|||
add_event_handler('get_element_url', 'get_element_url_protection_handler', EVENT_HANDLER_PRIORITY_NEUTRAL, 2 );
|
||||
add_event_handler('get_src_image_url', 'get_src_image_url_protection_handler', EVENT_HANDLER_PRIORITY_NEUTRAL, 2 );
|
||||
}
|
||||
trigger_action('init');
|
||||
trigger_notify('init');
|
||||
?>
|
||||
|
|
|
@ -67,7 +67,7 @@ final class SrcImage
|
|||
else
|
||||
{
|
||||
$ext = strtolower($ext);
|
||||
$this->rel_path = trigger_event('get_mimetype_location', get_themeconf('mime_icon_dir').$ext.'.png', $ext );
|
||||
$this->rel_path = trigger_change('get_mimetype_location', get_themeconf('mime_icon_dir').$ext.'.png', $ext );
|
||||
$this->flags |= self::IS_MIMETYPE;
|
||||
if ( ($size=@getimagesize(PHPWG_ROOT_PATH.$this->rel_path)) === false)
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ final class SrcImage
|
|||
$url = get_root_url().$this->rel_path;
|
||||
if ( !($this->flags & self::IS_MIMETYPE) )
|
||||
{
|
||||
$url = trigger_event('get_src_image_url', $url, $this);
|
||||
$url = trigger_change('get_src_image_url', $url, $this);
|
||||
}
|
||||
return embellish_url($url);
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ final class DerivativeImage
|
|||
return $src_image->get_url();
|
||||
}
|
||||
return embellish_url(
|
||||
trigger_event('get_derivative_url',
|
||||
trigger_change('get_derivative_url',
|
||||
get_root_url().$rel_url,
|
||||
$params, $src_image, $rel_url
|
||||
) );
|
||||
|
@ -405,7 +405,7 @@ final class DerivativeImage
|
|||
return $this->src_image->get_url();
|
||||
}
|
||||
return embellish_url(
|
||||
trigger_event('get_derivative_url',
|
||||
trigger_change('get_derivative_url',
|
||||
get_root_url().$this->rel_url,
|
||||
$this->params, $this->src_image, $this->rel_url
|
||||
) );
|
||||
|
|
|
@ -423,7 +423,7 @@ function pwg_log($image_id = null, $image_type = null)
|
|||
$do_log = $conf['history_guest'];
|
||||
}
|
||||
|
||||
$do_log = trigger_event('pwg_log_allowed', $do_log, $image_id, $image_type);
|
||||
$do_log = trigger_change('pwg_log_allowed', $do_log, $image_id, $image_type);
|
||||
|
||||
if (!$do_log)
|
||||
{
|
||||
|
@ -773,7 +773,7 @@ function redirect_html( $url , $msg = '', $refresh_time = 0)
|
|||
{
|
||||
$user = build_user( $conf['guest_id'], true);
|
||||
load_language('common.lang');
|
||||
trigger_action('loading_lang');
|
||||
trigger_notify('loading_lang');
|
||||
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
|
||||
$template = new Template(PHPWG_ROOT_PATH.'themes', get_default_theme());
|
||||
}
|
||||
|
@ -870,7 +870,7 @@ SELECT
|
|||
}
|
||||
|
||||
// plugins want remove some themes based on user status maybe?
|
||||
$themes = trigger_event('get_pwg_themes', $themes);
|
||||
$themes = trigger_change('get_pwg_themes', $themes);
|
||||
|
||||
return $themes;
|
||||
}
|
||||
|
@ -1112,7 +1112,7 @@ SELECT '.$conf['user_fields']['email'].'
|
|||
;';
|
||||
list($email) = pwg_db_fetch_row(pwg_query($query));
|
||||
|
||||
$email = trigger_event('get_webmaster_mail_address', $email);
|
||||
$email = trigger_change('get_webmaster_mail_address', $email);
|
||||
|
||||
return $email;
|
||||
}
|
||||
|
@ -1154,7 +1154,7 @@ SELECT param, value
|
|||
$conf[ $row['param'] ] = $val;
|
||||
}
|
||||
|
||||
trigger_action('load_conf', $condition);
|
||||
trigger_notify('load_conf', $condition);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -108,7 +108,7 @@ FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
|
|||
);
|
||||
}
|
||||
|
||||
$where = trigger_event('get_categories_menu_sql_where',
|
||||
$where = trigger_change('get_categories_menu_sql_where',
|
||||
$where, $user['expand'], $filter['enabled'] );
|
||||
|
||||
$query.= '
|
||||
|
@ -123,7 +123,7 @@ WHERE '.$where.'
|
|||
$child_date_last = @$row['max_date_last']> @$row['date_last'];
|
||||
$row = array_merge($row,
|
||||
array(
|
||||
'NAME' => trigger_event(
|
||||
'NAME' => trigger_change(
|
||||
'render_category_name',
|
||||
$row['name'],
|
||||
'get_categories_menu'
|
||||
|
@ -230,7 +230,7 @@ function get_category_preferred_image_orders()
|
|||
{
|
||||
global $conf, $page;
|
||||
|
||||
return trigger_event('get_category_preferred_image_orders', array(
|
||||
return trigger_change('get_category_preferred_image_orders', array(
|
||||
array(l10n('Default'), '', true),
|
||||
array(l10n('Photo title, A → Z'), 'name ASC', true),
|
||||
array(l10n('Photo title, Z → A'), 'name DESC', true),
|
||||
|
@ -279,7 +279,7 @@ function display_select_categories($categories,
|
|||
(3 * substr_count($category['global_rank'], '.')));
|
||||
$option.= '- ';
|
||||
$option.= strip_tags(
|
||||
trigger_event(
|
||||
trigger_change(
|
||||
'render_category_name',
|
||||
$category['name'],
|
||||
'display_select_categories'
|
||||
|
|
|
@ -31,7 +31,7 @@ add_event_handler('user_comment_check', 'user_comment_check',
|
|||
|
||||
/**
|
||||
* Does basic check on comment and returns action to perform.
|
||||
* This method is called by a trigger_event()
|
||||
* This method is called by a trigger_change()
|
||||
*
|
||||
* @param string $action before check
|
||||
* @param array $comment
|
||||
|
@ -211,7 +211,7 @@ SELECT count(1) FROM '.COMMENTS_TABLE.'
|
|||
}
|
||||
|
||||
// perform more spam check
|
||||
$comment_action = trigger_event('user_comment_check',
|
||||
$comment_action = trigger_change('user_comment_check',
|
||||
$comment_action, $comm
|
||||
);
|
||||
|
||||
|
@ -303,7 +303,7 @@ $user_where_clause.'
|
|||
array('author' => $GLOBALS['user']['username'],
|
||||
'comment_id' => $comment_id
|
||||
));
|
||||
trigger_action('user_comment_deletion', $comment_id);
|
||||
trigger_notify('user_comment_deletion', $comment_id);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ function update_user_comment($comment, $post_key)
|
|||
|
||||
// perform more spam check
|
||||
$comment_action =
|
||||
trigger_event('user_comment_check',
|
||||
trigger_change('user_comment_check',
|
||||
$comment_action,
|
||||
array_merge($comment,
|
||||
array('author' => $GLOBALS['user']['username'])
|
||||
|
@ -509,7 +509,7 @@ UPDATE '.COMMENTS_TABLE.'
|
|||
pwg_query($query);
|
||||
|
||||
invalidate_user_cache_nb_comments();
|
||||
trigger_action('user_comment_validation', $comment_id);
|
||||
trigger_notify('user_comment_validation', $comment_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -51,7 +51,7 @@ function get_cat_display_name($cat_informations, $url='')
|
|||
'get_cat_display_name wrong type for category ', E_USER_WARNING
|
||||
);
|
||||
|
||||
$cat['name'] = trigger_event(
|
||||
$cat['name'] = trigger_change(
|
||||
'render_category_name',
|
||||
$cat['name'],
|
||||
'get_cat_display_name'
|
||||
|
@ -132,7 +132,7 @@ SELECT id, name, permalink
|
|||
{
|
||||
$cat = $cache['cat_names'][$category_id];
|
||||
|
||||
$cat['name'] = trigger_event(
|
||||
$cat['name'] = trigger_change(
|
||||
'render_category_name',
|
||||
$cat['name'],
|
||||
'get_cat_display_name_cache'
|
||||
|
@ -463,7 +463,7 @@ function get_tags_content_title()
|
|||
.'" title="'
|
||||
.l10n('display photos linked to this tag')
|
||||
.'">'
|
||||
.trigger_event('render_tag_name', $page['tags'][$i]['name'], $page['tags'][$i])
|
||||
.trigger_change('render_tag_name', $page['tags'][$i]['name'], $page['tags'][$i])
|
||||
.'</a>';
|
||||
|
||||
if (count($page['tags']) > 2)
|
||||
|
@ -517,12 +517,12 @@ function set_status_header($code, $text='')
|
|||
$protocol = 'HTTP/1.0';
|
||||
|
||||
header( "$protocol $code $text", true, $code );
|
||||
trigger_action('set_status_header', $code, $text);
|
||||
trigger_notify('set_status_header', $code, $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the category comment for rendering in html textual mode (subcatify)
|
||||
* This method is called by a trigger_action()
|
||||
* This method is called by a trigger_notify()
|
||||
*
|
||||
* @param string $desc
|
||||
* @return string
|
||||
|
@ -534,7 +534,7 @@ function render_category_literal_description($desc)
|
|||
|
||||
/**
|
||||
* Add known menubar blocks.
|
||||
* This method is called by a trigger_event()
|
||||
* This method is called by a trigger_change()
|
||||
*
|
||||
* @param BlockManager[] $menu_ref_arr
|
||||
*/
|
||||
|
@ -562,7 +562,7 @@ function render_element_name($info)
|
|||
{
|
||||
if (!empty($info['name']))
|
||||
{
|
||||
return trigger_event('render_element_name', $info['name']);
|
||||
return trigger_change('render_element_name', $info['name']);
|
||||
}
|
||||
return get_name_from_file($info['file']);
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ function render_element_description($info, $param='')
|
|||
{
|
||||
if (!empty($info['comment']))
|
||||
{
|
||||
return trigger_event('render_element_description', $info['comment'], $param);
|
||||
return trigger_change('render_element_description', $info['comment'], $param);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
@ -624,7 +624,7 @@ function get_thumbnail_title($info, $title, $comment='')
|
|||
}
|
||||
|
||||
$title = htmlspecialchars(strip_tags($title));
|
||||
$title = trigger_event('get_thumbnail_title', $title, $info);
|
||||
$title = trigger_change('get_thumbnail_title', $title, $info);
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
|
|
@ -312,7 +312,7 @@ function switch_lang_to($language)
|
|||
load_language($filename, $dirname, array('language'=>$language) );
|
||||
}
|
||||
|
||||
trigger_action('loading_lang');
|
||||
trigger_notify('loading_lang');
|
||||
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR,
|
||||
array('language'=>$language, 'no_fallback'=>true, 'local'=>true)
|
||||
);
|
||||
|
@ -696,7 +696,7 @@ function pwg_mail($to, $args=array(), $tpl=array())
|
|||
if (!isset($conf_mail[$cache_key]['theme']))
|
||||
{
|
||||
$conf_mail[$cache_key]['theme'] = get_mail_template($content_type);
|
||||
trigger_action('before_parse_mail_template', $cache_key, $content_type);
|
||||
trigger_notify('before_parse_mail_template', $cache_key, $content_type);
|
||||
}
|
||||
$template = &$conf_mail[$cache_key]['theme'];
|
||||
|
||||
|
@ -854,7 +854,7 @@ function pwg_mail($to, $args=array(), $tpl=array())
|
|||
}
|
||||
|
||||
$ret = true;
|
||||
$pre_result = trigger_event('before_send_mail', true, $to, $args, $mail);
|
||||
$pre_result = trigger_change('before_send_mail', true, $to, $args, $mail);
|
||||
|
||||
if ($pre_result)
|
||||
{
|
||||
|
@ -945,6 +945,6 @@ function pwg_send_mail_test($success, $mail, $args)
|
|||
}
|
||||
}
|
||||
|
||||
trigger_action('functions_mail_included');
|
||||
trigger_notify('functions_mail_included');
|
||||
|
||||
?>
|
|
@ -104,7 +104,7 @@ function clean_iptc_value($value)
|
|||
{
|
||||
// apparently mac uses some MacRoman crap encoding. I don't know
|
||||
// how to detect it so a plugin should do the trick.
|
||||
$value = trigger_event('clean_iptc_value', $value);
|
||||
$value = trigger_change('clean_iptc_value', $value);
|
||||
if ( ($qual = qualify_utf8($value)) != 0)
|
||||
{// has non ascii chars
|
||||
if ($qual>0)
|
||||
|
@ -152,7 +152,7 @@ function get_exif_data($filename, $map)
|
|||
// Read EXIF data
|
||||
if ($exif = @read_exif_data($filename))
|
||||
{
|
||||
$exif = trigger_event('format_exif_data', $exif, $filename, $map);
|
||||
$exif = trigger_change('format_exif_data', $exif, $filename, $map);
|
||||
|
||||
// configured fields
|
||||
foreach ($map as $key => $field)
|
||||
|
|
|
@ -246,7 +246,6 @@ function remove_event_handler($event, $func,
|
|||
* optional _$args_ are not transmitted.
|
||||
*
|
||||
* @since 2.6
|
||||
* @todo remove trigger_event()
|
||||
*
|
||||
* @param string $event
|
||||
* @param mixed $data data to transmit to all handlers
|
||||
|
@ -254,22 +253,12 @@ function remove_event_handler($event, $func,
|
|||
* @return mixed $data
|
||||
*/
|
||||
function trigger_change($event, $data=null)
|
||||
{
|
||||
$args = func_get_args();
|
||||
return call_user_func_array('trigger_event', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 2.6
|
||||
* @see trigger_change
|
||||
*/
|
||||
function trigger_event($event, $data=null)
|
||||
{
|
||||
global $pwg_event_handlers;
|
||||
|
||||
if (isset($pwg_event_handlers['trigger']))
|
||||
{// debugging
|
||||
trigger_action('trigger',
|
||||
trigger_notify('trigger',
|
||||
array('type'=>'event', 'event'=>$event, 'data'=>$data)
|
||||
);
|
||||
}
|
||||
|
@ -298,7 +287,7 @@ function trigger_event($event, $data=null)
|
|||
|
||||
if (isset($pwg_event_handlers['trigger']))
|
||||
{// debugging
|
||||
trigger_action('trigger',
|
||||
trigger_notify('trigger',
|
||||
array('type'=>'post_event', 'event'=>$event, 'data'=>$data)
|
||||
);
|
||||
}
|
||||
|
@ -311,28 +300,17 @@ function trigger_event($event, $data=null)
|
|||
* trigger_notify() is only used as a notifier, no modification of data is possible
|
||||
*
|
||||
* @since 2.6
|
||||
* @todo remove trigger_action()
|
||||
*
|
||||
* @param string $event
|
||||
* @param mixed $args,... optional arguments
|
||||
*/
|
||||
function trigger_notify($event)
|
||||
{
|
||||
$args = func_get_args();
|
||||
return call_user_func_array('trigger_action', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 2.6
|
||||
* @see trigger_notify
|
||||
*/
|
||||
function trigger_action($event)
|
||||
{
|
||||
global $pwg_event_handlers;
|
||||
|
||||
if (isset($pwg_event_handlers['trigger']) and $event!='trigger')
|
||||
{// debugging - avoid recursive calls
|
||||
trigger_action('trigger',
|
||||
trigger_notify('trigger',
|
||||
array('type'=>'action', 'event'=>$event, 'data'=>null)
|
||||
);
|
||||
}
|
||||
|
@ -455,7 +433,7 @@ function load_plugins()
|
|||
{// include main from a function to avoid using same function context
|
||||
load_plugin($plugin);
|
||||
}
|
||||
trigger_action('plugins_loaded');
|
||||
trigger_notify('plugins_loaded');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ INSERT
|
|||
*/
|
||||
function update_rating_score($element_id = false)
|
||||
{
|
||||
if ( ($alt_result = trigger_event('update_rating_score', false, $element_id)) !== false)
|
||||
if ( ($alt_result = trigger_change('update_rating_score', false, $element_id)) !== false)
|
||||
{
|
||||
return $alt_result;
|
||||
}
|
||||
|
|
|
@ -928,7 +928,7 @@ function qsearch_get_images(QExpression $expr, QResults $qsr)
|
|||
break;
|
||||
default:
|
||||
// allow plugins to have their own scope with columns added in db by themselves
|
||||
$clauses = trigger_event('qsearch_get_images_sql_scopes', $clauses, $token, $expr);
|
||||
$clauses = trigger_change('qsearch_get_images_sql_scopes', $clauses, $token, $expr);
|
||||
break;
|
||||
}
|
||||
if (!empty($clauses))
|
||||
|
@ -1019,7 +1019,7 @@ SELECT image_id FROM '.IMAGE_TAG_TABLE.'
|
|||
usort($all_tags, 'tag_alpha_compare');
|
||||
foreach ( $all_tags as &$tag )
|
||||
{
|
||||
$tag['name'] = trigger_event('render_tag_name', $tag['name'], $tag);
|
||||
$tag['name'] = trigger_change('render_tag_name', $tag['name'], $tag);
|
||||
}
|
||||
$qsr->all_tags = $all_tags;
|
||||
$qsr->tag_ids = $token_tag_ids;
|
||||
|
@ -1151,7 +1151,7 @@ function get_quick_search_results_no_cache($q, $options)
|
|||
$scopes[] = new QDateRangeScope('posted', $postedDateAliases);
|
||||
|
||||
// allow plugins to add their own scopes
|
||||
$scopes = trigger_event('qsearch_get_scopes', $scopes);
|
||||
$scopes = trigger_change('qsearch_get_scopes', $scopes);
|
||||
$expression = new QExpression($q, $scopes);
|
||||
|
||||
// get inflections for terms
|
||||
|
@ -1176,7 +1176,7 @@ function get_quick_search_results_no_cache($q, $options)
|
|||
}
|
||||
|
||||
|
||||
trigger_action('qsearch_expression_parsed', $expression);
|
||||
trigger_notify('qsearch_expression_parsed', $expression);
|
||||
//var_export($expression);
|
||||
|
||||
if (count($expression->stokens)==0)
|
||||
|
@ -1188,7 +1188,7 @@ function get_quick_search_results_no_cache($q, $options)
|
|||
qsearch_get_images($expression, $qsr);
|
||||
|
||||
// allow plugins to evaluate their own scopes
|
||||
trigger_action('qsearch_before_eval', $expression, $qsr);
|
||||
trigger_notify('qsearch_before_eval', $expression, $qsr);
|
||||
|
||||
$ids = qsearch_eval($expression, $qsr, $tmp, $search_results['qs']['unmatched_terms']);
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ SELECT *
|
|||
if ( $counter )
|
||||
{
|
||||
$row['counter'] = $counter;
|
||||
$row['name'] = trigger_event('render_tag_name', $row['name'], $row);
|
||||
$row['name'] = trigger_change('render_tag_name', $row['name'], $row);
|
||||
$tags[] = $row;
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ SELECT *
|
|||
$tags = array();
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$row['name'] = trigger_event('render_tag_name', $row['name'], $row);
|
||||
$row['name'] = trigger_change('render_tag_name', $row['name'], $row);
|
||||
$tags[] = $row;
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,7 @@ SELECT t.*, count(*) AS counter
|
|||
$tags = array();
|
||||
while($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$row['name'] = trigger_event('render_tag_name', $row['name'], $row);
|
||||
$row['name'] = trigger_change('render_tag_name', $row['name'], $row);
|
||||
$tags[] = $row;
|
||||
}
|
||||
usort($tags, 'tag_alpha_compare');
|
||||
|
|
|
@ -174,7 +174,7 @@ function register_user($login, $password, $mail_address, $notify_admin=true, &$e
|
|||
}
|
||||
}
|
||||
|
||||
$errors = trigger_event(
|
||||
$errors = trigger_change(
|
||||
'register_user_check',
|
||||
$errors,
|
||||
array(
|
||||
|
@ -273,7 +273,7 @@ SELECT id
|
|||
);
|
||||
}
|
||||
|
||||
trigger_action(
|
||||
trigger_notify(
|
||||
'register_user',
|
||||
array(
|
||||
'id'=>$user_id,
|
||||
|
@ -959,7 +959,7 @@ function log_user($user_id, $remember_me)
|
|||
$_SESSION['pwg_uid'] = (int)$user_id;
|
||||
|
||||
$user['id'] = $_SESSION['pwg_uid'];
|
||||
trigger_action('user_login', $user['id']);
|
||||
trigger_notify('user_login', $user['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -984,7 +984,7 @@ function auto_login()
|
|||
if ($key!==false and $key===$cookie[2])
|
||||
{
|
||||
log_user($cookie[0], true);
|
||||
trigger_action('login_success', stripslashes($username));
|
||||
trigger_notify('login_success', stripslashes($username));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1085,7 +1085,7 @@ function pwg_password_verify($password, $hash, $user_id=null)
|
|||
*/
|
||||
function try_log_user($username, $password, $remember_me)
|
||||
{
|
||||
return trigger_event('try_log_user', false, $username, $password, $remember_me);
|
||||
return trigger_change('try_log_user', false, $username, $password, $remember_me);
|
||||
}
|
||||
|
||||
add_event_handler('try_log_user', 'pwg_login', EVENT_HANDLER_PRIORITY_NEUTRAL, 4);
|
||||
|
@ -1121,10 +1121,10 @@ SELECT '.$conf['user_fields']['id'].' AS id,
|
|||
if ($conf['password_verify']($password, $row['password'], $row['id']))
|
||||
{
|
||||
log_user($row['id'], $remember_me);
|
||||
trigger_action('login_success', stripslashes($username));
|
||||
trigger_notify('login_success', stripslashes($username));
|
||||
return true;
|
||||
}
|
||||
trigger_action('login_failure', stripslashes($username));
|
||||
trigger_notify('login_failure', stripslashes($username));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1135,7 +1135,7 @@ function logout_user()
|
|||
{
|
||||
global $conf;
|
||||
|
||||
trigger_action('user_logout', @$_SESSION['pwg_uid']);
|
||||
trigger_notify('user_logout', @$_SESSION['pwg_uid']);
|
||||
|
||||
$_SESSION = array();
|
||||
session_unset();
|
||||
|
|
|
@ -97,7 +97,7 @@ SELECT
|
|||
);
|
||||
}
|
||||
|
||||
trigger_action('loc_end_no_photo_yet');
|
||||
trigger_notify('loc_end_no_photo_yet');
|
||||
|
||||
$template->pparse('no_photo_yet');
|
||||
exit();
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
//
|
||||
$template->set_filenames(array('header'=>'header.tpl'));
|
||||
|
||||
trigger_action('loc_begin_page_header');
|
||||
trigger_notify('loc_begin_page_header');
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
|
@ -35,7 +35,7 @@ $template->assign(
|
|||
$page['gallery_title'] : $conf['gallery_title'],
|
||||
|
||||
'PAGE_BANNER' =>
|
||||
trigger_event(
|
||||
trigger_change(
|
||||
'render_page_banner',
|
||||
str_replace(
|
||||
'%gallery_title%',
|
||||
|
@ -96,10 +96,10 @@ if ( isset( $refresh ) and intval($refresh) >= 0
|
|||
));
|
||||
}
|
||||
|
||||
trigger_action('loc_end_page_header');
|
||||
trigger_notify('loc_end_page_header');
|
||||
|
||||
header('Content-Type: text/html; charset='.get_pwg_charset());
|
||||
$template->parse('header');
|
||||
|
||||
trigger_action('loc_after_page_header');
|
||||
trigger_notify('loc_after_page_header');
|
||||
?>
|
|
@ -22,7 +22,7 @@
|
|||
// +-----------------------------------------------------------------------+
|
||||
$template->set_filenames(array('tail'=>'footer.tpl'));
|
||||
|
||||
trigger_action('loc_begin_page_tail');
|
||||
trigger_notify('loc_begin_page_tail');
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
|
@ -76,7 +76,7 @@ if ( !empty($conf['mobile_theme']) && (get_device() != 'desktop' || mobile_theme
|
|||
);
|
||||
}
|
||||
|
||||
trigger_action('loc_end_page_tail');
|
||||
trigger_notify('loc_end_page_tail');
|
||||
//
|
||||
// Generate the page
|
||||
//
|
||||
|
|
|
@ -73,7 +73,7 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
|
|||
}
|
||||
|
||||
// allow plugins to notify what's going on
|
||||
trigger_action( 'user_comment_insertion',
|
||||
trigger_notify( 'user_comment_insertion',
|
||||
array_merge($comm, array('action'=>$comment_action) )
|
||||
);
|
||||
}
|
||||
|
@ -181,9 +181,9 @@ SELECT
|
|||
$tpl_comment =
|
||||
array(
|
||||
'ID' => $row['id'],
|
||||
'AUTHOR' => trigger_event('render_comment_author', $row['author']),
|
||||
'AUTHOR' => trigger_change('render_comment_author', $row['author']),
|
||||
'DATE' => format_date($row['date'], true),
|
||||
'CONTENT' => trigger_event('render_comment_content',$row['content']),
|
||||
'CONTENT' => trigger_change('render_comment_content',$row['content']),
|
||||
'WEBSITE_URL' => $row['website_url'],
|
||||
);
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ if ('categories' == $page['section'])
|
|||
$page = array_merge(
|
||||
$page,
|
||||
array(
|
||||
'comment' => trigger_event(
|
||||
'comment' => trigger_change(
|
||||
'render_category_description',
|
||||
$page['category']['comment'],
|
||||
'main_page_category_description'
|
||||
|
@ -637,5 +637,5 @@ if ( 'categories'==$page['section'] and isset($page['category']) )
|
|||
unset( $need_redirect, $page['hit_by'] );
|
||||
}
|
||||
|
||||
trigger_action('loc_end_section_init');
|
||||
trigger_notify('loc_end_section_init');
|
||||
?>
|
|
@ -521,7 +521,7 @@ class Template
|
|||
if ($combi->version !== false)
|
||||
$href .= '?v' . ($combi->version ? $combi->version : PHPWG_VERSION);
|
||||
// trigger the event for eventual use of a cdn
|
||||
$href = trigger_event('combined_css', $href, $combi);
|
||||
$href = trigger_change('combined_css', $href, $combi);
|
||||
$content[] = '<link rel="stylesheet" type="text/css" href="'.$href.'">';
|
||||
}
|
||||
$this->output = str_replace(self::COMBINED_CSS_TAG,
|
||||
|
@ -878,7 +878,7 @@ var s,after = document.getElementsByTagName(\'script\')[document.getElementsByTa
|
|||
}
|
||||
}
|
||||
// trigger the event for eventual use of a cdn
|
||||
$ret = trigger_event('combined_script', $ret, $script);
|
||||
$ret = trigger_change('combined_script', $ret, $script);
|
||||
return embellish_url($ret);
|
||||
}
|
||||
|
||||
|
@ -1934,7 +1934,7 @@ final class FileCombiner
|
|||
global $template;
|
||||
$handle = $this->type. '.' .$combinable->id;
|
||||
$template->set_filename($handle, realpath(PHPWG_ROOT_PATH.$combinable->path));
|
||||
trigger_action( 'combinable_preparse', $template, $combinable, $this); //allow themes and plugins to set their own vars to template ...
|
||||
trigger_notify( 'combinable_preparse', $template, $combinable, $this); //allow themes and plugins to set their own vars to template ...
|
||||
$content = $template->parse($handle, true);
|
||||
|
||||
if ($this->is_css)
|
||||
|
@ -1990,7 +1990,7 @@ final class FileCombiner
|
|||
require_once(PHPWG_ROOT_PATH.'include/cssmin.class.php');
|
||||
$css = CssMin::minify($css, array('Variables'=>false));
|
||||
}
|
||||
$css = trigger_event('combined_css_postfilter', $css);
|
||||
$css = trigger_change('combined_css_postfilter', $css);
|
||||
return $css;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,5 +72,5 @@ if ($conf['browser_language'] and (is_a_guest() or is_generic()) )
|
|||
{
|
||||
get_browser_language($user['language']);
|
||||
}
|
||||
trigger_action('user_init', $user);
|
||||
trigger_notify('user_init', $user);
|
||||
?>
|
||||
|
|
|
@ -291,7 +291,7 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
|
|||
array('methodName')
|
||||
);
|
||||
|
||||
trigger_action('ws_add_methods', array(&$this) );
|
||||
trigger_notify('ws_add_methods', array(&$this) );
|
||||
uksort( $this->_methods, 'strnatcmp' );
|
||||
$this->_requestHandler->handleRequest($this);
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
|
|||
|
||||
@header('Content-Type: '.$contentType.'; charset='.get_pwg_charset());
|
||||
print_r($encodedResponse);
|
||||
trigger_action('sendResponse', $encodedResponse );
|
||||
trigger_notify('sendResponse', $encodedResponse );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -598,7 +598,7 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
|
|||
return new PwgError(WS_ERR_MISSING_PARAM, 'Missing parameters: '.implode(',',$missing_params));
|
||||
}
|
||||
|
||||
$result = trigger_event('ws_invoke_allowed', true, $methodName, $params);
|
||||
$result = trigger_change('ws_invoke_allowed', true, $methodName, $params);
|
||||
if ( strtolower( @get_class($result) )!='pwgerror')
|
||||
{
|
||||
if ( !empty($method['include']) )
|
||||
|
|
|
@ -264,7 +264,7 @@ SELECT
|
|||
else
|
||||
{
|
||||
$row['name'] = strip_tags(
|
||||
trigger_event(
|
||||
trigger_change(
|
||||
'render_category_name',
|
||||
$row['name'],
|
||||
'ws_categories_getList'
|
||||
|
@ -273,7 +273,7 @@ SELECT
|
|||
}
|
||||
|
||||
$row['comment'] = strip_tags(
|
||||
trigger_event(
|
||||
trigger_change(
|
||||
'render_category_description',
|
||||
$row['comment'],
|
||||
'ws_categories_getList'
|
||||
|
@ -501,7 +501,7 @@ SELECT id, name, comment, uppercats, global_rank, dir
|
|||
$row['nb_images'] = isset($nb_images_of[$id]) ? $nb_images_of[$id] : 0;
|
||||
|
||||
$row['name'] = strip_tags(
|
||||
trigger_event(
|
||||
trigger_change(
|
||||
'render_category_name',
|
||||
$row['name'],
|
||||
'ws_categories_getAdminList'
|
||||
|
@ -514,7 +514,7 @@ SELECT id, name, comment, uppercats, global_rank, dir
|
|||
)
|
||||
);
|
||||
$row['comment'] = strip_tags(
|
||||
trigger_event(
|
||||
trigger_change(
|
||||
'render_category_description',
|
||||
$row['comment'],
|
||||
'ws_categories_getAdminList'
|
||||
|
@ -787,7 +787,7 @@ SELECT id, name, dir
|
|||
if (!empty($row['dir']))
|
||||
{
|
||||
$row['name'] = strip_tags(
|
||||
trigger_event(
|
||||
trigger_change(
|
||||
'render_category_name',
|
||||
$row['name'],
|
||||
'ws_categories_move'
|
||||
|
|
|
@ -40,7 +40,7 @@ if ($page['start']>0 && $page['start']>=count($page['items']))
|
|||
page_not_found('', duplicate_index_url(array('start'=>0)));
|
||||
}
|
||||
|
||||
trigger_action('loc_begin_index');
|
||||
trigger_notify('loc_begin_index');
|
||||
|
||||
//---------------------------------------------- change of image display order
|
||||
if (isset($_GET['image_order']))
|
||||
|
@ -361,7 +361,7 @@ if ( empty($page['is_external']) or !$page['is_external'] )
|
|||
|
||||
//------------------------------------------------------------ end
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_index');
|
||||
trigger_notify('loc_end_index');
|
||||
flush_page_messages();
|
||||
$template->parse_index_buttons();
|
||||
$template->pparse('index');
|
||||
|
|
2
nbm.php
2
nbm.php
|
@ -33,7 +33,7 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions_notification_by_mail.inc.p
|
|||
// Translations are in admin file too
|
||||
load_language('admin.lang');
|
||||
// Need to update a second time
|
||||
trigger_action('loading_lang');
|
||||
trigger_notify('loading_lang');
|
||||
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ SELECT COUNT(*)
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_GUEST);
|
||||
|
||||
trigger_action('loc_begin_notification');
|
||||
trigger_notify('loc_begin_notification');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | new feed creation |
|
||||
|
@ -114,7 +114,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theNotificationPage', $them
|
|||
// | html code display |
|
||||
// +-----------------------------------------------------------------------+
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_notification');
|
||||
trigger_notify('loc_end_notification');
|
||||
flush_page_messages();
|
||||
$template->pparse('notification');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -35,7 +35,7 @@ include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
|
|||
|
||||
check_status(ACCESS_FREE);
|
||||
|
||||
trigger_action('loc_begin_password');
|
||||
trigger_notify('loc_begin_password');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Functions |
|
||||
|
@ -117,7 +117,7 @@ function process_password_request()
|
|||
|
||||
unset_make_full_url();
|
||||
|
||||
$message = trigger_event('render_lost_password_mail_content', $message);
|
||||
$message = trigger_change('render_lost_password_mail_content', $message);
|
||||
|
||||
$email_params = array(
|
||||
'subject' => '['.$conf['gallery_title'].'] '.l10n('Password Reset'),
|
||||
|
@ -353,7 +353,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('thePasswordPage', $themecon
|
|||
// +-----------------------------------------------------------------------+
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_password');
|
||||
trigger_notify('loc_end_password');
|
||||
flush_page_messages();
|
||||
$template->pparse('password');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
14
picture.php
14
picture.php
|
@ -144,7 +144,7 @@ add_event_handler(
|
|||
// add default event handler for rendering element description
|
||||
add_event_handler('render_element_description', 'nl2br');
|
||||
|
||||
trigger_action('loc_begin_picture');
|
||||
trigger_notify('loc_begin_picture');
|
||||
|
||||
// this is the default handler that generates the display for the element
|
||||
function default_picture_content($content, $element_info)
|
||||
|
@ -434,7 +434,7 @@ else
|
|||
}
|
||||
|
||||
// don't increment if adding a comment
|
||||
if (trigger_event('allow_increment_element_hit_count', $inc_hit_count, $page['image_id'] ) )
|
||||
if (trigger_change('allow_increment_element_hit_count', $inc_hit_count, $page['image_id'] ) )
|
||||
{
|
||||
$query = '
|
||||
UPDATE
|
||||
|
@ -614,7 +614,7 @@ $url_metadata = add_url_params( $url_metadata, array('metadata'=>null) );
|
|||
|
||||
|
||||
// do we have a plugin that can show metadata for something else than images?
|
||||
$metadata_showable = trigger_event(
|
||||
$metadata_showable = trigger_change(
|
||||
'get_element_metadata_available',
|
||||
(
|
||||
($conf['show_exif'] or $conf['show_iptc'])
|
||||
|
@ -632,7 +632,7 @@ if ( $metadata_showable and pwg_get_session_var('show_metadata') )
|
|||
$page['body_id'] = 'thePicturePage';
|
||||
|
||||
// allow plugins to change what we computed before passing data to template
|
||||
$picture = trigger_event('picture_pictures_data', $picture);
|
||||
$picture = trigger_change('picture_pictures_data', $picture);
|
||||
|
||||
//------------------------------------------------------- navigation management
|
||||
foreach (array('first','previous','next','last', 'current') as $which_image)
|
||||
|
@ -808,7 +808,7 @@ if (isset($picture['current']['comment'])
|
|||
{
|
||||
$template->assign(
|
||||
'COMMENT_IMG',
|
||||
trigger_event('render_element_description',
|
||||
trigger_change('render_element_description',
|
||||
$picture['current']['comment'],
|
||||
'picture_page_element_description'
|
||||
)
|
||||
|
@ -937,7 +937,7 @@ SELECT id, name, permalink
|
|||
|
||||
// maybe someone wants a special display (call it before page_header so that
|
||||
// they can add stylesheets)
|
||||
$element_content = trigger_event(
|
||||
$element_content = trigger_change(
|
||||
'render_element_content',
|
||||
'',
|
||||
$picture['current']
|
||||
|
@ -987,7 +987,7 @@ if ($conf['picture_menu'] AND (!isset($themeconf['hide_menu_on']) OR !in_array('
|
|||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_picture');
|
||||
trigger_notify('loc_end_picture');
|
||||
flush_page_messages();
|
||||
if ($page['slideshow'] and $conf['light_slideshow'])
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ if
|
|||
$help_content = '';
|
||||
}
|
||||
|
||||
$help_content = trigger_event(
|
||||
$help_content = trigger_change(
|
||||
'get_popup_help_content', $help_content, $_GET['page']);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -43,7 +43,7 @@ if (!defined('PHPWG_ROOT_PATH'))
|
|||
|
||||
$userdata = $user;
|
||||
|
||||
trigger_action('loc_begin_profile');
|
||||
trigger_notify('loc_begin_profile');
|
||||
|
||||
// Reset to default (Guest) custom settings
|
||||
if (isset($_POST['reset_to_default']))
|
||||
|
@ -84,7 +84,7 @@ SELECT '.implode(',', $fields).'
|
|||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_profile');
|
||||
trigger_notify('loc_end_profile');
|
||||
flush_page_messages();
|
||||
$template->pparse('profile');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
@ -279,7 +279,7 @@ function save_profile_from_post($userdata, &$errors)
|
|||
array('primary' => array('user_id'), 'update' => $fields),
|
||||
array($data));
|
||||
}
|
||||
trigger_action( 'save_profile_from_post', $userdata['id'] );
|
||||
trigger_notify( 'save_profile_from_post', $userdata['id'] );
|
||||
|
||||
if (!empty($_POST['redirect']))
|
||||
{
|
||||
|
@ -335,7 +335,7 @@ function load_profile_in_template($url_action, $url_redirect, $userdata)
|
|||
$template->assign('IN_ADMIN', defined('IN_ADMIN'));
|
||||
|
||||
// allow plugins to add their own form data to content
|
||||
trigger_action( 'load_profile_in_template', $userdata );
|
||||
trigger_notify( 'load_profile_in_template', $userdata );
|
||||
|
||||
$template->assign('PWG_TOKEN', get_pwg_token());
|
||||
$template->assign_var_from_handle('PROFILE_CONTENT', 'profile_content');
|
||||
|
|
|
@ -37,7 +37,7 @@ if (!$conf['allow_user_registration'])
|
|||
page_forbidden('User registration closed');
|
||||
}
|
||||
|
||||
trigger_action('loc_begin_register');
|
||||
trigger_notify('loc_begin_register');
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theRegisterPage', $themecon
|
|||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_register');
|
||||
trigger_notify('loc_end_register');
|
||||
flush_page_messages();
|
||||
$template->parse('register');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
|
@ -30,7 +30,7 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
|
|||
// +-----------------------------------------------------------------------+
|
||||
check_status(ACCESS_GUEST);
|
||||
|
||||
trigger_action('loc_begin_search');
|
||||
trigger_notify('loc_begin_search');
|
||||
|
||||
//------------------------------------------------------------------ form check
|
||||
$search = array();
|
||||
|
@ -236,7 +236,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theSearchPage', $themeconf[
|
|||
|
||||
//------------------------------------------------------------ html code display
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_search');
|
||||
trigger_notify('loc_end_search');
|
||||
flush_page_messages();
|
||||
$template->pparse('search');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
4
tags.php
4
tags.php
|
@ -49,7 +49,7 @@ include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
|
|||
|
||||
check_status(ACCESS_GUEST);
|
||||
|
||||
trigger_action('loc_begin_tags');
|
||||
trigger_notify('loc_begin_tags');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | page header and options |
|
||||
|
@ -195,7 +195,7 @@ if (!isset($themeconf['hide_menu_on']) OR !in_array('theTagsPage', $themeconf['h
|
|||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_header.php');
|
||||
trigger_action('loc_end_tags');
|
||||
trigger_notify('loc_end_tags');
|
||||
flush_page_messages();
|
||||
$template->pparse('tags');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue