summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/libraries/Admin_View.php34
-rw-r--r--modules/gallery/libraries/Theme_View.php2
-rw-r--r--modules/gallery/tests/xss_data.txt10
3 files changed, 37 insertions, 9 deletions
diff --git a/modules/gallery/libraries/Admin_View.php b/modules/gallery/libraries/Admin_View.php
index 62645d18..ba348d7a 100644
--- a/modules/gallery/libraries/Admin_View.php
+++ b/modules/gallery/libraries/Admin_View.php
@@ -93,7 +93,28 @@ class Admin_View_Core extends Gallery_View {
case "body_attributes":
case "html_attributes":
$blocks = array();
+ if (method_exists("gallery_theme", $function)) {
+ switch (count($args)) {
+ case 0:
+ $blocks[] = gallery_theme::$function($this);
+ break;
+ case 1:
+ $blocks[] = gallery_theme::$function($this, $args[0]);
+ break;
+ case 2:
+ $blocks[] = gallery_theme::$function($this, $args[0], $args[1]);
+ break;
+ default:
+ $blocks[] = call_user_func_array(
+ array("gallery_theme", $function),
+ array_merge(array($this), $args));
+ }
+ }
+
foreach (module::active() as $module) {
+ if ($module->name == "gallery") {
+ continue;
+ }
$helper_class = "{$module->name}_theme";
if (class_exists($helper_class) && method_exists($helper_class, $function)) {
$blocks[] = call_user_func_array(
@@ -102,15 +123,22 @@ class Admin_View_Core extends Gallery_View {
}
}
+ $helper_class = theme::$admin_theme_name . "_theme";
+ if (class_exists($helper_class) && method_exists($helper_class, $function)) {
+ $blocks[] = call_user_func_array(
+ array($helper_class, $function),
+ array_merge(array($this), $args));
+ }
+
if (Session::instance()->get("debug")) {
- if ($function != "admin_head") {
+ if ($function != "admin_head" && $function != "body_attributes") {
array_unshift(
- $blocks, "<div class=\"g-annotated-theme-block g-annotated-theme-block_$function\">" .
+ $blocks,
+ "<div class=\"g-annotated-theme-block g-annotated-theme-block_$function g-clear-fix\">" .
"<div class=\"title\">$function</div>");
$blocks[] = "</div>";
}
}
-
return implode("\n", $blocks);
default:
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index da1e8ce8..fbc58258 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -103,7 +103,7 @@ class Theme_View_Core extends Gallery_View {
public function siblings($limit=null, $offset=null) {
return call_user_func_array(
$this->siblings_callback[0],
- array_merge($this->siblings_callback[1], array($offset, $limit)));
+ array_merge($this->siblings_callback[1], array($limit, $offset)));
}
public function tag() {
diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt
index 7e77a70b..5daaa371 100644
--- a/modules/gallery/tests/xss_data.txt
+++ b/modules/gallery/tests/xss_data.txt
@@ -41,8 +41,8 @@ modules/comment/views/user_profile_comments.html.php 10 DIRTY_JS $comme
modules/comment/views/user_profile_comments.html.php 11 DIRTY $comment->item()->thumb_img(array(),50)
modules/exif/views/exif_dialog.html.php 14 DIRTY $details[$i]["caption"]
modules/exif/views/exif_dialog.html.php 21 DIRTY $details[$i]["caption"]
-modules/g2_import/views/admin_g2_import.html.php 7 DIRTY_JS url::site("__ARGS__")
-modules/g2_import/views/admin_g2_import.html.php 49 DIRTY $form
+modules/g2_import/views/admin_g2_import.html.php 5 DIRTY_JS url::site("__ARGS__")
+modules/g2_import/views/admin_g2_import.html.php 47 DIRTY $form
modules/gallery/views/admin_advanced_settings.html.php 21 DIRTY_ATTR text::alternate("g-odd","g-even")
modules/gallery/views/admin_block_log_entries.html.php 4 DIRTY_ATTR log::severity_class($entry->severity)
modules/gallery/views/admin_block_log_entries.html.php 8 DIRTY_JS user_profile::url($entry->user->id)
@@ -350,9 +350,9 @@ modules/search/views/search.html.php 45 DIRTY $item-
modules/search/views/search.html.php 47 DIRTY_ATTR $item_class
modules/search/views/search.html.php 57 DIRTY $theme->paginator()
modules/search/views/search_link.html.php 15 DIRTY_ATTR $album_id
-modules/server_add/views/admin_server_add.html.php 8 DIRTY_JS url::site("__ARGS__")
-modules/server_add/views/admin_server_add.html.php 16 DIRTY $form
-modules/server_add/views/admin_server_add.html.php 27 DIRTY_ATTR $id
+modules/server_add/views/admin_server_add.html.php 6 DIRTY_JS url::site("__ARGS__")
+modules/server_add/views/admin_server_add.html.php 14 DIRTY $form
+modules/server_add/views/admin_server_add.html.php 25 DIRTY_ATTR $id
modules/server_add/views/server_add_tree.html.php 20 DIRTY_ATTR is_dir($file)?"ui-icon-folder-collapsed":"ui-icon-document"
modules/server_add/views/server_add_tree.html.php 21 DIRTY_ATTR is_dir($file)?"g-directory":"g-file"
modules/server_add/views/server_add_tree_dialog.html.php 3 DIRTY_JS url::site("server_add/children?path=__PATH__")