diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-18 12:44:16 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-18 12:44:16 -0800 |
commit | 372f589f66436c5b5bb8ed8a98532842c1e01a71 (patch) | |
tree | d5180b31a916edbc744289b8f194d28e40b98d3a | |
parent | 4d4e81ca267cf6dd4fd48c2185d6e24949e0568f (diff) | |
parent | 350f6b58764beced6cd32497ad11e530b091fd5c (diff) |
Merge branch 'master' into talmdal_dev
-rw-r--r-- | modules/gallery/libraries/Theme_View.php | 2 | ||||
-rw-r--r-- | modules/gallery/tests/xss_data.txt | 36 | ||||
-rw-r--r-- | modules/image_block/helpers/image_block_installer.php | 30 |
3 files changed, 20 insertions, 48 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 07ba3bbf..b1167d0e 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -171,7 +171,7 @@ class Theme_View_Core extends Gallery_View { } $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; - $v->last_visible_position = $this->page * $this->page_size; + $v->last_visible_position = min($this->page * $this->page_size, $v->total); } else { $v->position = $this->position; $v->total = $this->sibling_count; diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index 9146ddb2..3eaa6561 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -119,7 +119,7 @@ modules/gallery/views/admin_themes.html.php 76 DIRTY $info- modules/gallery/views/admin_themes.html.php 78 DIRTY $info->description modules/gallery/views/admin_themes_preview.html.php 7 DIRTY_ATTR $url modules/gallery/views/in_place_edit.html.php 2 DIRTY form::open($action,array("method"=>"post","id"=>"g-in-place-edit-form","class"=>"g-short-form"),$hidden) -modules/gallery/views/in_place_edit.html.php 5 DIRTY form::input("input",$form["input"]," class='textbox'") +modules/gallery/views/in_place_edit.html.php 5 DIRTY form::input("input",$form["input"]," class=\"textbox\"") modules/gallery/views/in_place_edit.html.php 12 DIRTY form::close() modules/gallery/views/in_place_edit.html.php 14 DIRTY $errors["input"] modules/gallery/views/kohana_error_page.php 102 DIRTY $message @@ -203,10 +203,10 @@ modules/gallery/views/permissions_form.html.php 75 DIRTY_JS $item- modules/gallery/views/permissions_form.html.php 80 DIRTY_JS $group->id modules/gallery/views/permissions_form.html.php 80 DIRTY_JS $permission->id modules/gallery/views/permissions_form.html.php 80 DIRTY_JS $item->id -modules/gallery/views/simple_uploader.html.php 7 DIRTY_JS url::file("lib/uploadify/uploadify.swf") -modules/gallery/views/simple_uploader.html.php 8 DIRTY_JS url::site("simple_uploader/add_photo/{$item->id}") -modules/gallery/views/simple_uploader.html.php 15 DIRTY_JS url::file("lib/uploadify/cancel.png") -modules/gallery/views/simple_uploader.html.php 43 DIRTY_JS t("Completed") +modules/gallery/views/simple_uploader.html.php 20 DIRTY_JS url::file("lib/uploadify/uploadify.swf") +modules/gallery/views/simple_uploader.html.php 21 DIRTY_JS url::site("simple_uploader/add_photo/{$item->id}") +modules/gallery/views/simple_uploader.html.php 28 DIRTY_JS url::file("lib/uploadify/cancel.png") +modules/gallery/views/simple_uploader.html.php 56 DIRTY_JS t("Completed") modules/gallery/views/upgrader.html.php 57 DIRTY_ATTR $done?"muted":"" modules/gallery/views/upgrader.html.php 61 DIRTY_ATTR $done?"muted":"" modules/gallery/views/upgrader.html.php 69 DIRTY_ATTR $module->version==$module->code_version?"current":"upgradeable" @@ -232,15 +232,16 @@ modules/organize/views/organize_dialog.html.php 3 DIRTY_JS url::s modules/organize/views/organize_dialog.html.php 4 DIRTY_JS url::site("organize/rearrange/__TARGET_ID__/__BEFORE__?csrf=$csrf") modules/organize/views/organize_dialog.html.php 5 DIRTY_JS url::site("organize/sort_order/__ALBUM_ID__/__COL__/__DIR__?csrf=$csrf") modules/organize/views/organize_dialog.html.php 6 DIRTY_JS url::site("organize/tree/__ALBUM_ID__") -modules/organize/views/organize_dialog.html.php 20 DIRTY $album_tree -modules/organize/views/organize_dialog.html.php 27 DIRTY $micro_thumb_grid -modules/organize/views/organize_dialog.html.php 35 DIRTY form::dropdown(array("id"=>"g-organize-sort-column"),album::get_sort_order_options(),$album->sort_column) -modules/organize/views/organize_dialog.html.php 36 DIRTY form::dropdown(array("id"=>"g-organize-sort-order"),array("ASC"=>"Ascending","DESC"=>"Descending"),$album->sort_order) +modules/organize/views/organize_dialog.html.php 14 DIRTY $album_tree +modules/organize/views/organize_dialog.html.php 24 DIRTY $micro_thumb_grid +modules/organize/views/organize_dialog.html.php 32 DIRTY form::dropdown(array("id"=>"g-organize-sort-column"),album::get_sort_order_options(),$album->sort_column) +modules/organize/views/organize_dialog.html.php 33 DIRTY form::dropdown(array("id"=>"g-organize-sort-order"),array("ASC"=>"Ascending","DESC"=>"Descending"),$album->sort_order) modules/organize/views/organize_thumb_grid.html.php 3 DIRTY_ATTR $child->id modules/organize/views/organize_thumb_grid.html.php 4 DIRTY_ATTR $child->id modules/organize/views/organize_thumb_grid.html.php 5 DIRTY_ATTR $child->is_album()?"g-album":"g-photo" modules/organize/views/organize_thumb_grid.html.php 6 DIRTY $child->thumb_img(array("class"=>"g-thumbnail","ref"=>$child->id),90,true) -modules/organize/views/organize_thumb_grid.html.php 14 DIRTY_JS url::site("organize/album/$album->id/".($offset+25)) +modules/organize/views/organize_thumb_grid.html.php 7 DIRTY $child->is_album()?" class=\"ui-icon ui-icon-note\"":"" +modules/organize/views/organize_thumb_grid.html.php 15 DIRTY_JS url::site("organize/album/$album->id/".($offset+25)) modules/organize/views/organize_tree.html.php 2 DIRTY_ATTR access::can("edit",$album)?"":"g-view-only" modules/organize/views/organize_tree.html.php 3 DIRTY_ATTR $album->id modules/organize/views/organize_tree.html.php 6 DIRTY_ATTR $selected&&$album->id==$selected->id?"selected":"" @@ -248,7 +249,7 @@ modules/organize/views/organize_tree.html.php 7 DIRTY_ATTR $alb modules/organize/views/organize_tree.html.php 13 DIRTY View::factory("organize_tree.html",array("selected"=>$selected,"album"=>$child)); modules/organize/views/organize_tree.html.php 15 DIRTY_ATTR access::can("edit",$child)?"":"g-view-only" modules/organize/views/organize_tree.html.php 16 DIRTY_ATTR $child->id -modules/organize/views/organize_tree.html.php 19 DIRTY_ATTR $child->id +modules/organize/views/organize_tree.html.php 18 DIRTY_ATTR $child->id modules/recaptcha/views/admin_recaptcha.html.php 11 DIRTY $form modules/recaptcha/views/admin_recaptcha.html.php 23 DIRTY_JS $public_key modules/recaptcha/views/form_recaptcha.html.php 7 DIRTY_JS $public_key @@ -346,8 +347,9 @@ themes/wind/views/album.html.php 16 DIRTY_ATTR $chi themes/wind/views/album.html.php 16 DIRTY_ATTR $item_class themes/wind/views/album.html.php 18 DIRTY_JS $child->url() themes/wind/views/album.html.php 19 DIRTY $child->thumb_img(array("class"=>"g-thumbnail")) -themes/wind/views/album.html.php 23 DIRTY_JS $child->url() -themes/wind/views/album.html.php 41 DIRTY $theme->paginator() +themes/wind/views/album.html.php 23 DIRTY_ATTR $item_class +themes/wind/views/album.html.php 24 DIRTY_JS $child->url() +themes/wind/views/album.html.php 42 DIRTY $theme->paginator() themes/wind/views/block.html.php 3 DIRTY_ATTR $anchor themes/wind/views/block.html.php 5 DIRTY_ATTR $css_id themes/wind/views/block.html.php 6 DIRTY $title @@ -373,10 +375,10 @@ themes/wind/views/page.html.php 104 DIRTY_JS $paren themes/wind/views/page.html.php 120 DIRTY $content themes/wind/views/page.html.php 126 DIRTY newView("sidebar.html") themes/wind/views/page.html.php 133 DIRTY $footer_text -themes/wind/views/paginator.html.php 32 DIRTY_JS $first_page_url -themes/wind/views/paginator.html.php 41 DIRTY_JS $previous_page_url -themes/wind/views/paginator.html.php 69 DIRTY_JS $next_page_url -themes/wind/views/paginator.html.php 78 DIRTY_JS $last_page_url +themes/wind/views/paginator.html.php 33 DIRTY_JS $first_page_url +themes/wind/views/paginator.html.php 42 DIRTY_JS $previous_page_url +themes/wind/views/paginator.html.php 70 DIRTY_JS $next_page_url +themes/wind/views/paginator.html.php 79 DIRTY_JS $last_page_url themes/wind/views/photo.html.php 8 DIRTY_JS $theme->item()->width themes/wind/views/photo.html.php 8 DIRTY_JS $theme->item()->height themes/wind/views/photo.html.php 18 DIRTY $theme->paginator() diff --git a/modules/image_block/helpers/image_block_installer.php b/modules/image_block/helpers/image_block_installer.php deleted file mode 100644 index 04a15619..00000000 --- a/modules/image_block/helpers/image_block_installer.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2009 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class image_block_installer { - static function install() { - module::set_version("image_block", 2); - } - - static function upgrade($version) { - if ($version == 1) { - module::set_version("image_block", 2); - } - } -} |