aboutsummaryrefslogtreecommitdiffstats
path: root/include/common.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2013-02-02 07:09:52 +0000
committerrvelices <rv-github@modusoptimus.com>2013-02-02 07:09:52 +0000
commit5b22fcea0eff97187eacd965a54d04d8c2568b6a (patch)
tree53599fa6167470f51b3cea570be79c4e1203ce60 /include/common.inc.php
parent21c97f38588b3350e9ebc1e37a985b64fd5b9f1b (diff)
feature 2831: simple way to protect urls of originals
git-svn-id: http://piwigo.org/svn/trunk@20516 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/common.inc.php')
-rw-r--r--include/common.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/common.inc.php b/include/common.inc.php
index 61157fa5a..46d11e4e4 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -266,5 +266,10 @@ add_event_handler('render_comment_content', 'render_comment_content');
add_event_handler('render_comment_author', 'strip_tags');
add_event_handler('render_tag_url', 'str2url');
add_event_handler('blockmanager_register_blocks', 'register_default_menubar_blocks', EVENT_HANDLER_PRIORITY_NEUTRAL-1);
+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');
?>