Skip to content
Browse files

Added a filter for header javascript so plugins can modify it. Closes…

… Redmine feature number 2411 and 2412.
  • Loading branch information...
1 parent 72db09c commit 2eb9146e08c51809aed52b5894d1dfbd7a988ef1 @brianherbert brianherbert committed Nov 18, 2011
Showing with 9 additions and 0 deletions.
  1. +6 −0 application/controllers/admin/settings.php
  2. +3 −0 application/libraries/Themes.php
View
6 application/controllers/admin/settings.php
@@ -248,6 +248,9 @@ function site()
// Everything is A-Okay!
$form_saved = TRUE;
+ // Action::site_settings_modified - Site settings have changed
+ Event::run('ushahidi_action.site_settings_modified');
+
// repopulate the form fields
$form = arr::overwrite($form, $post->as_array());
@@ -434,6 +437,9 @@ function index($saved = false)
// Everything is A-Okay!
$form_saved = TRUE;
+
+ // Action::map_settings_modified - Map settings have changed
+ Event::run('ushahidi_action.map_settings_modified');
// Redirect to reload everything over again
url::redirect('admin/settings/index/saved');
View
3 application/libraries/Themes.php
@@ -186,6 +186,9 @@ function runScheduler(img){img.onload = null;img.src = '".url::site().'scheduler
"//-->
</script>";
+ // Filter::header_js - Modify Header Javascript
+ Event::run('ushahidi_filter.header_js', $inline_js);
+
return $core_js.$plugin_js.$inline_js;
}

0 comments on commit 2eb9146

Please sign in to comment.
Something went wrong with that request. Please try again.