From ee13b934f46d67982e5eeea21f81ac58f166741c Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 15 Jan 2011 13:14:43 -0800
Subject: Fix all the head() and admin_head() theme callbacks to return the
results of the $theme->css() and $theme->script() calls. This handles the
case where combining scripts/css returns HTML instead of putting it in the
queue for combination. Fixes #1611.
---
modules/gallery/helpers/gallery_theme.php | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index 978c69a6..ebf8f38e 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -21,9 +21,9 @@ class gallery_theme_Core {
static function head($theme) {
$session = Session::instance();
$buf = "";
- $theme->css("gallery.css");
+ $buf .= $theme->css("gallery.css");
if ($session->get("debug")) {
- $theme->css("debug.css");
+ $buf .= $theme->css("debug.css");
}
if (module::is_active("rss")) {
@@ -40,32 +40,33 @@ class gallery_theme_Core {
if (count(locales::installed())) {
// Needed by the languages block
- $theme->script("jquery.cookie.js");
+ $buf .= $theme->script("jquery.cookie.js");
}
if ($session->get("l10n_mode", false)) {
- $theme->css("l10n_client.css");
- $theme->script("jquery.cookie.js");
- $theme->script("l10n_client.js");
+ $buf .= $theme->css("l10n_client.css")
+ . $theme->script("jquery.cookie.js")
+ . $theme->script("l10n_client.js");
}
- $theme->css("uploadify/uploadify.css");
+ $buf .= $theme->css("uploadify/uploadify.css");
return $buf;
}
static function admin_head($theme) {
- $theme->css("gallery.css");
- $theme->script("gallery.panel.js");
+ $buf = $theme->css("gallery.css");
+ $buf .= $theme->script("gallery.panel.js");
$session = Session::instance();
if ($session->get("debug")) {
- $theme->css("debug.css");
+ $buf .= $theme->css("debug.css");
}
if ($session->get("l10n_mode", false)) {
- $theme->css("l10n_client.css");
- $theme->script("jquery.cookie.js");
- $theme->script("l10n_client.js");
+ $buf .= $theme->css("l10n_client.css");
+ $buf .= $theme->script("jquery.cookie.js");
+ $buf .=$theme->script("l10n_client.js");
}
+ return $buf;
}
static function page_bottom($theme) {
--
cgit v1.2.3
From 0020f87d6a23ce00200074b678a9293d055e27a3 Mon Sep 17 00:00:00 2001
From: Joe7
Date: Sat, 15 Jan 2011 21:49:22 +0100
Subject: Fixed paging for albums ordered by random. MySql has problems when
comparing float values against -seemingly same- float input, see
http://dev.mysql.com/doc/refman/5.0/en/problems-with-float.html for details.
Fixes #1610
---
installer/install.sql | 4 ++--
modules/gallery/helpers/gallery_installer.php | 9 +++++++--
modules/gallery/module.info | 2 +-
3 files changed, 10 insertions(+), 5 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/installer/install.sql b/installer/install.sql
index 0ed7f2f3..07aae36d 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -160,7 +160,7 @@ CREATE TABLE {items} (
`name` varchar(255) DEFAULT NULL,
`owner_id` int(9) DEFAULT NULL,
`parent_id` int(9) NOT NULL,
- `rand_key` float DEFAULT NULL,
+ `rand_key` decimal(11,10) DEFAULT NULL,
`relative_path_cache` varchar(255) DEFAULT NULL,
`relative_url_cache` varchar(255) DEFAULT NULL,
`resize_dirty` tinyint(1) DEFAULT '1',
@@ -244,7 +244,7 @@ CREATE TABLE {modules} (
KEY `weight` (`weight`)
) AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {modules} VALUES (1,1,'gallery',43,1);
+INSERT INTO {modules} VALUES (1,1,'gallery',44,1);
INSERT INTO {modules} VALUES (2,1,'user',3,2);
INSERT INTO {modules} VALUES (3,1,'comment',3,3);
INSERT INTO {modules} VALUES (4,1,'organize',3,4);
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index f7b8da5f..3c7b1c84 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -92,7 +92,7 @@ class gallery_installer {
`name` varchar(255) default NULL,
`owner_id` int(9) default NULL,
`parent_id` int(9) NOT NULL,
- `rand_key` float default NULL,
+ `rand_key` decimal(11,10) default NULL,
`relative_path_cache` varchar(255) default NULL,
`relative_url_cache` varchar(255) default NULL,
`resize_dirty` boolean default 1,
@@ -309,7 +309,7 @@ class gallery_installer {
module::set_var("gallery", "show_user_profiles_to", "registered_users");
module::set_var("gallery", "extra_binary_paths", "/usr/local/bin:/opt/local/bin:/opt/bin");
- module::set_version("gallery", 43);
+ module::set_version("gallery", 44);
}
static function upgrade($version) {
@@ -653,6 +653,11 @@ class gallery_installer {
$db->query("ALTER TABLE {items} CHANGE `description` `description` text DEFAULT NULL");
module::set_version("gallery", $version = 43);
}
+
+ if ($version == 43) {
+ $db->query("ALTER TABLE {items} CHANGE `rand_key` `rand_key` DECIMAL(11, 10)");
+ module::set_version("gallery", $version = 44);
+ }
}
static function uninstall() {
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index eb579ab6..4c4e63a1 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -1,3 +1,3 @@
name = "Gallery 3"
description = "Gallery core application"
-version = 43
+version = 44
--
cgit v1.2.3
From ac44e9c930ec83545b37e1e31381919fbd849d26 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sun, 16 Jan 2011 15:49:34 -0800
Subject: First step in setting up version checking.
We now have two types of packages (release, git). Instead of using
constants, we now have gallery::version_string() which returns the
current version string. If you're on a release package, then the
version string looks like:
3.0 (Santa Fe)
If you're on a git package, then the version string looks like this:
3.0.1 (branch 3.0.x build 3)
We track the build number in a new file in the gallery3 root called
BUILD_NUMBER which we will update periodically with the latest
build number for each branch.
---
BUILD_NUMBER | 1 +
modules/gallery/helpers/gallery.php | 25 +++++++++++++++++++++++-
modules/gallery/helpers/gallery_theme.php | 2 +-
modules/gallery/views/admin_block_stats.html.php | 2 +-
4 files changed, 27 insertions(+), 3 deletions(-)
create mode 100644 BUILD_NUMBER
(limited to 'modules/gallery/helpers')
diff --git a/BUILD_NUMBER b/BUILD_NUMBER
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/BUILD_NUMBER
@@ -0,0 +1 @@
+1
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index 282289b5..c4a6286c 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -18,7 +18,10 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class gallery_Core {
- const VERSION = "3.0+ (git)";
+ const VERSION = "3.0+";
+ const CODE_NAME = "";
+ const RELEASE_CHANNEL = "git";
+ const RELEASE_BRANCH = "master";
/**
* If Gallery is in maintenance mode, then force all non-admins to get routed to a "This site is
@@ -184,4 +187,24 @@ class gallery_Core {
}
putenv("PATH=" . implode(":", $path_env));
}
+
+ /**
+ * Return a string describing this version of Gallery and the type of release.
+ */
+ static function version_string() {
+ if (gallery::RELEASE_CHANNEL == "git") {
+ return sprintf(
+ "%s (branch %s build %s)", gallery::VERSION, gallery::RELEASE_BRANCH, gallery::build_number());
+ } else {
+ return sprintf("%s (%s)", gallery::VERSION, gallery::CODE_NAME);
+ }
+ }
+
+ /**
+ * Return the contents of the BUILD_NUMBER file, which should be a single integer.
+ */
+ static function build_number() {
+ $lines = file(DOCROOT . "BUILD_NUMBER", FILE_IGNORE_NEW_LINES);
+ return $lines[0];
+ }
}
\ No newline at end of file
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index ebf8f38e..d75c6fc6 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -115,7 +115,7 @@ class gallery_theme_Core {
static function credits() {
$version_string = SafeString::of_safe_html(
- 'Gallery ' . gallery::VERSION . '');
+ 'Gallery ' . gallery::version_string() . '');
return "" .
t(module::get_var("gallery", "credits"),
array("url" => "http://gallery.menalto.com",
diff --git a/modules/gallery/views/admin_block_stats.html.php b/modules/gallery/views/admin_block_stats.html.php
index 1dec8ccd..c8c54765 100644
--- a/modules/gallery/views/admin_block_stats.html.php
+++ b/modules/gallery/views/admin_block_stats.html.php
@@ -1,7 +1,7 @@
-
- = t("Version: %version", array("version" => gallery::VERSION)) ?>
+ = t("Version: %version", array("version" => gallery::version_string())) ?>
-
= t("Albums: %count", array("count" => $album_count)) ?>
--
cgit v1.2.3
From b78b1090184dd863c984e54652935963cc502eb8 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sun, 16 Jan 2011 17:10:30 -0800
Subject: Fix indentation.
---
modules/gallery/helpers/gallery.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index c4a6286c..31b342db 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -194,7 +194,8 @@ class gallery_Core {
static function version_string() {
if (gallery::RELEASE_CHANNEL == "git") {
return sprintf(
- "%s (branch %s build %s)", gallery::VERSION, gallery::RELEASE_BRANCH, gallery::build_number());
+ "%s (branch %s build %s)", gallery::VERSION, gallery::RELEASE_BRANCH,
+ gallery::build_number());
} else {
return sprintf("%s (%s)", gallery::VERSION, gallery::CODE_NAME);
}
--
cgit v1.2.3
From 84d576606d709dcccef2549fdb926d47494a876c Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sun, 16 Jan 2011 21:46:03 -0800
Subject: Change the value column of the messages table from a varchar(255) to
a text. Fixes #1612.
---
modules/gallery/helpers/gallery_installer.php | 9 +++++++--
modules/gallery/module.info | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 3c7b1c84..92e5b7b8 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -136,7 +136,7 @@ class gallery_installer {
`id` int(9) NOT NULL auto_increment,
`key` varchar(255) default NULL,
`severity` varchar(32) default NULL,
- `value` varchar(255) default NULL,
+ `value` text default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY(`key`))
DEFAULT CHARSET=utf8;");
@@ -309,7 +309,7 @@ class gallery_installer {
module::set_var("gallery", "show_user_profiles_to", "registered_users");
module::set_var("gallery", "extra_binary_paths", "/usr/local/bin:/opt/local/bin:/opt/bin");
- module::set_version("gallery", 44);
+ module::set_version("gallery", 45);
}
static function upgrade($version) {
@@ -658,6 +658,11 @@ class gallery_installer {
$db->query("ALTER TABLE {items} CHANGE `rand_key` `rand_key` DECIMAL(11, 10)");
module::set_version("gallery", $version = 44);
}
+
+ if ($version == 44) {
+ $db->query("ALTER TABLE {messages} CHANGE `value` `value` text default NULL");
+ module::set_version("gallery", $version = 45);
+ }
}
static function uninstall() {
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index 4c4e63a1..b79df7be 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -1,3 +1,3 @@
name = "Gallery 3"
description = "Gallery core application"
-version = 44
+version = 45
--
cgit v1.2.3
From 70abfb2a20734802c922c0e9917d2a1778aef3f2 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sun, 16 Jan 2011 22:16:09 -0800
Subject: Upgrade checking code is now here, along with a bump of the Gallery
module to v46. There's a new block in the admin dashboard which controls
whether automatic checking happens, and lets you check immediately. If a
newer version is detected, a site status message appears for admins providing
upgrade instructions.
Automatic checking is not yet implemented (even though the UI claims
that it exists). This is all for #1605.
---
.../gallery/controllers/admin_upgrade_checker.php | 49 ++++++++++++
modules/gallery/helpers/gallery_block.php | 12 ++-
modules/gallery/helpers/gallery_installer.php | 16 +++-
modules/gallery/helpers/upgrade_checker.php | 91 ++++++++++++++++++++++
modules/gallery/module.info | 2 +-
.../gallery/views/upgrade_checker_block.html.php | 45 +++++++++++
6 files changed, 212 insertions(+), 3 deletions(-)
create mode 100644 modules/gallery/controllers/admin_upgrade_checker.php
create mode 100644 modules/gallery/helpers/upgrade_checker.php
create mode 100644 modules/gallery/views/upgrade_checker_block.html.php
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/controllers/admin_upgrade_checker.php b/modules/gallery/controllers/admin_upgrade_checker.php
new file mode 100644
index 00000000..4b1467cd
--- /dev/null
+++ b/modules/gallery/controllers/admin_upgrade_checker.php
@@ -0,0 +1,49 @@
+server("HTTP_REFERER")) {
+ url::redirect($referer);
+ } else {
+ url::redirect(item::root()->abs_url());
+ }
+ }
+
+ function set_auto($val) {
+ access::verify_csrf();
+ module::set_var("gallery", "upgrade_checker_auto_enabled", (bool)$val);
+
+ if ((bool)$val) {
+ message::success(t("Automatic upgrade checking is enabled."));
+ } else {
+ message::success(t("Automatic upgrade checking is disabled."));
+ }
+ url::redirect("admin/dashboard");
+ }
+}
diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php
index 1d92d66d..2189a710 100644
--- a/modules/gallery/helpers/gallery_block.php
+++ b/modules/gallery/helpers/gallery_block.php
@@ -25,7 +25,9 @@ class gallery_block_Core {
"log_entries" => t("Log entries"),
"stats" => t("Gallery stats"),
"platform_info" => t("Platform information"),
- "project_news" => t("Gallery project news"));
+ "project_news" => t("Gallery project news"),
+ "upgrade_checker" => t("Check for Gallery upgrades")
+ );
}
static function get_site_list() {
@@ -101,6 +103,14 @@ class gallery_block_Core {
$block = "";
}
break;
+
+ case "upgrade_checker":
+ $block = new Block();
+ $block->css_id = "g-upgrade-available-block";
+ $block->title = t("Check for Gallery upgrades");
+ $block->content = new View("upgrade_checker_block.html");
+ $block->content->version_info = upgrade_checker::version_info();
+ $block->content->auto_check_enabled = upgrade_checker::auto_check_enabled();
}
return $block;
}
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 92e5b7b8..1ffe9bae 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -259,6 +259,7 @@ class gallery_installer {
module::set_var("gallery", "default_locale", "en_US");
module::set_var("gallery", "image_quality", 75);
module::set_var("gallery", "image_sharpen", 15);
+ module::set_var("gallery", "upgrade_checker_auto_enabled", true);
// Add rules for generating our thumbnails and resizes
graphics::add_rule(
@@ -285,6 +286,7 @@ class gallery_installer {
block_manager::add("dashboard_sidebar", "gallery", "platform_info");
block_manager::add("dashboard_sidebar", "gallery", "project_news");
block_manager::add("dashboard_center", "gallery", "welcome");
+ block_manager::add("dashboard_center", "gallery", "upgrade_checker");
block_manager::add("dashboard_center", "gallery", "photo_stream");
block_manager::add("dashboard_center", "gallery", "log_entries");
@@ -309,7 +311,7 @@ class gallery_installer {
module::set_var("gallery", "show_user_profiles_to", "registered_users");
module::set_var("gallery", "extra_binary_paths", "/usr/local/bin:/opt/local/bin:/opt/bin");
- module::set_version("gallery", 45);
+ module::set_version("gallery", 46);
}
static function upgrade($version) {
@@ -663,6 +665,18 @@ class gallery_installer {
$db->query("ALTER TABLE {messages} CHANGE `value` `value` text default NULL");
module::set_version("gallery", $version = 45);
}
+
+ if ($version == 45) {
+ // Splice the upgrade_checker block into the admin dashboard at the top
+ // of the page, but under the welcome block if it's in the first position.
+ $blocks = block_manager::get_active("dashboard_center");
+ $index = count($blocks) && current($blocks) == array("gallery", "welcome") ? 1 : 0;
+ array_splice($blocks, $index, 0, array(random::int() => array("gallery", "upgrade_checker")));
+ block_manager::set_active("dashboard_center", $blocks);
+
+ module::set_var("gallery", "upgrade_checker_auto_enabled", true);
+ module::set_version("gallery", $version = 46);
+ }
}
static function uninstall() {
diff --git a/modules/gallery/helpers/upgrade_checker.php b/modules/gallery/helpers/upgrade_checker.php
new file mode 100644
index 00000000..9311cf4a
--- /dev/null
+++ b/modules/gallery/helpers/upgrade_checker.php
@@ -0,0 +1,91 @@
+get("upgrade_checker_version_info"));
+ }
+
+ static function auto_check_enabled() {
+ return (bool)module::get_var("gallery", "upgrade_checker_auto_enabled");
+ }
+
+ static function fetch_version_info() {
+ $result = new stdClass();
+ try {
+ list ($status, $headers, $body) = remote::do_request(upgrade_checker::CHECK_URL);
+ if ($status == "HTTP/1.1 200 OK") {
+ $result->status = "success";
+ foreach (explode("\n", $body) as $line) {
+ if ($line) {
+ list($key, $val) = explode("=", $line, 2);
+ $result->data[$key] = $val;
+ }
+ }
+ } else {
+ $result->status = "error";
+ }
+ } catch (Exception $e) {
+ Kohana_Log::add("error",
+ sprintf("%s in %s at line %s:\n%s", $e->getMessage(), $e->getFile(),
+ $e->getLine(), $e->getTraceAsString()));
+ }
+ $result->timestamp = time();
+ Cache::instance()->set("upgrade_checker_version_info", serialize($result), null, 86400 * 365);
+ }
+
+ static function check_for_upgrade() {
+ $version_info = upgrade_checker::version_info();
+ $upgrade_available = false;
+ if ($version_info) {
+ if (gallery::RELEASE_CHANNEL == "release") {
+ if (version_compare($version_info->data["release_version"], gallery::VERSION, ">")) {
+ site_status::warning(
+ t("A newer version of Gallery is available! Upgrade now to version %version or wait until later.",
+ array("version" => $version_info->data["release_version"],
+ "upgrade-url" => $version_info->data["release_upgrade_url"],
+ "hide-url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))),
+ "upgrade_checker");
+ $upgrade_available = true;
+ }
+ } else {
+ $branch = gallery::RELEASE_BRANCH;
+ if (isset($version_info->data["{$branch}_build_number"]) &&
+ version_compare($version_info->data["{$branch}_build_number"],
+ gallery::build_number(), ">")) {
+ site_status::warning(
+ t("A newer version of Gallery is available! Upgrade now to version %version (build %build on branch %branch) or wait until later.",
+ array("version" => $version_info->data["{$branch}_version"],
+ "upgrade-url" => $version_info->data["{$branch}_upgrade_url"],
+ "build" => $version_info->data["{$branch}_build_number"],
+ "branch" => $branch,
+ "hide-url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))),
+ "upgrade_checker");
+ $upgrade_available = true;
+ }
+ }
+ }
+
+ if (!$upgrade_available) {
+ site_status::clear("upgrade_checker");
+ }
+ }
+}
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index b79df7be..4c0c8866 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -1,3 +1,3 @@
name = "Gallery 3"
description = "Gallery core application"
-version = 45
+version = 46
diff --git a/modules/gallery/views/upgrade_checker_block.html.php b/modules/gallery/views/upgrade_checker_block.html.php
new file mode 100644
index 00000000..30e18305
--- /dev/null
+++ b/modules/gallery/views/upgrade_checker_block.html.php
@@ -0,0 +1,45 @@
+
+
+ = t("Gallery can check to see if there is a new version available for you to use. It is a good idea to upgrade your Gallery to get the latest features and security fixes. Your privacy is important so no information about your Gallery is shared during this process. You can disable this feature below.") ?>
+
+
+
+ if (gallery::RELEASE_CHANNEL == "release"): ?>
+ = t("You are using the official Gallery %version release, code named %code_name.", array("version" => gallery::VERSION, "code_name" => gallery::CODE_NAME)) ?>
+ else: ?>
+ = t("You are using an experimental snapshot of Gallery %version (build %build_number on branch %branch).", array("version" => gallery::VERSION, "branch" => gallery::RELEASE_BRANCH, "build_number" => gallery::build_number())) ?>
+ endif ?>
+
+
+
+ ">
+ = t("Check now") ?>
+
+ if ($auto_check_enabled): ?>
+ ">
+ = t("Disable automatic checking") ?>
+
+ else: ?>
+ ">
+ = t("Enable automatic checking") ?>
+
+ endif ?>
+
+
+
+ if ($auto_check_enabled): ?>
+ = t("Automatic upgrade checking is enabled.") ?>
+ else: ?>
+ = t("Automatic upgrade checking is disabled.") ?>
+ endif ?>
+ if (!$version_info): ?>
+ = t("No upgrade checks have been made yet.") ?>
+ else: ?>
+ = t("The last upgrade check was made on %date.",
+ array("date" => gallery::date_time($version_info->timestamp))) ?>
+ endif ?>
+
+
--
cgit v1.2.3
From 167f635a6ce5a71b35450844f9b5c647aa14bcc1 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sun, 16 Jan 2011 23:06:19 -0800
Subject: Add arguments to random::int() to match mt_rand(). Follow on to
cd48b89f3166e7fa732b5cb06d33fba018af9127 for #1527.
---
modules/gallery/helpers/random.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/helpers/random.php b/modules/gallery/helpers/random.php
index a26762bd..dfc7558c 100644
--- a/modules/gallery/helpers/random.php
+++ b/modules/gallery/helpers/random.php
@@ -42,9 +42,13 @@ class random_Core {
}
/**
- * Return a random number between 0 and mt_getrandmax()
+ * Return a random number between $min and $max. If $min and $max are not specified,
+ * return a random number between 0 and mt_getrandmax()
*/
- static function int() {
+ static function int($min=null, $max=null) {
+ if ($min || $max) {
+ return mt_rand($min, $max);
+ }
return mt_rand();
}
}
\ No newline at end of file
--
cgit v1.2.3
From 66bb496b6c2ad9c5341644b2e303e694078374d1 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sun, 16 Jan 2011 23:14:57 -0800
Subject: If the logged in user is an admin and it's been more than 7 days
since the last check and auto upgrade checking is enabled, fire off an XHR to
check for a possible upgrade. Finishes off #1605.
---
modules/gallery/helpers/gallery_installer.php | 3 +++
modules/gallery/helpers/gallery_theme.php | 20 ++++++++++++++++++--
modules/gallery/helpers/upgrade_checker.php | 25 +++++++++++++++++++++++++
3 files changed, 46 insertions(+), 2 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 1ffe9bae..41ed1c6e 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -677,6 +677,9 @@ class gallery_installer {
module::set_var("gallery", "upgrade_checker_auto_enabled", true);
module::set_version("gallery", $version = 46);
}
+
+ // Clear any upgrade check strings, we are probably up to date.
+ site_status::clear("upgrade_check");
}
static function uninstall() {
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index d75c6fc6..a6ca5eb7 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -76,13 +76,22 @@ class gallery_theme_Core {
$profiler = new Profiler();
$profiler->render();
}
+ $content = "";
if ($session->get("l10n_mode", false)) {
- return L10n_Client_Controller::l10n_form();
+ $content .= L10n_Client_Controller::l10n_form();
}
if ($session->get_once("after_install")) {
- return new View("welcome_message_loader.html");
+ $content .= new View("welcome_message_loader.html");
}
+
+ if (identity::active_user()->admin && upgrade_checker::should_auto_check()) {
+ $content .= '';
+ }
+ return $content;
}
static function admin_page_bottom($theme) {
@@ -107,6 +116,13 @@ class gallery_theme_Core {
setInterval("adminReauthCheck();", 60 * 1000);
';
+ if (upgrade_checker::should_auto_check()) {
+ $content .= '';
+ }
+
if ($session->get("l10n_mode", false)) {
$content .= "\n" . L10n_Client_Controller::l10n_form();
}
diff --git a/modules/gallery/helpers/upgrade_checker.php b/modules/gallery/helpers/upgrade_checker.php
index 9311cf4a..ef1308d7 100644
--- a/modules/gallery/helpers/upgrade_checker.php
+++ b/modules/gallery/helpers/upgrade_checker.php
@@ -19,15 +19,37 @@
*/
class upgrade_checker_Core {
const CHECK_URL = "http://gallery.menalto.com/versioncheck/gallery3";
+ const AUTO_CHECK_INTERVAL = 604800; // 7 days in seconds
+ /**
+ * Return the last version info blob retrieved from the Gallery website or
+ * null if no checks have been performed.
+ */
static function version_info() {
return unserialize(Cache::instance()->get("upgrade_checker_version_info"));
}
+ /**
+ * Return true if auto checking is enabled.
+ */
static function auto_check_enabled() {
return (bool)module::get_var("gallery", "upgrade_checker_auto_enabled");
}
+ /**
+ * Return true if it's time to auto check.
+ */
+ static function should_auto_check() {
+ if (upgrade_checker::auto_check_enabled() && random::int(1, 100) == 1) {
+ $version_info = upgrade_checker::version_info();
+ return (!$version_info || (time() - $version_info->timestamp) > AUTO_CHECK_INTERVAL);
+ }
+ return false;
+ }
+
+ /**
+ * Fech version info from the Gallery website.
+ */
static function fetch_version_info() {
$result = new stdClass();
try {
@@ -52,6 +74,9 @@ class upgrade_checker_Core {
Cache::instance()->set("upgrade_checker_version_info", serialize($result), null, 86400 * 365);
}
+ /**
+ * Check the latest version info blob to see if it's time for an upgrade.
+ */
static function check_for_upgrade() {
$version_info = upgrade_checker::version_info();
$upgrade_available = false;
--
cgit v1.2.3
From 14ae5d854400d632b63a331f541f180b8d1f3ea1 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Mon, 17 Jan 2011 17:07:32 -0800
Subject: Update version checking code to expect "branch_" as the prefix for
all branch related lines. For #1605.
---
modules/gallery/helpers/upgrade_checker.php | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/helpers/upgrade_checker.php b/modules/gallery/helpers/upgrade_checker.php
index ef1308d7..0e72bb94 100644
--- a/modules/gallery/helpers/upgrade_checker.php
+++ b/modules/gallery/helpers/upgrade_checker.php
@@ -93,14 +93,14 @@ class upgrade_checker_Core {
}
} else {
$branch = gallery::RELEASE_BRANCH;
- if (isset($version_info->data["{$branch}_build_number"]) &&
- version_compare($version_info->data["{$branch}_build_number"],
+ if (isset($version_info->data["branch_{$branch}_build_number"]) &&
+ version_compare($version_info->data["branch_{$branch}_build_number"],
gallery::build_number(), ">")) {
site_status::warning(
t("A newer version of Gallery is available! Upgrade now to version %version (build %build on branch %branch) or wait until later.",
- array("version" => $version_info->data["{$branch}_version"],
- "upgrade-url" => $version_info->data["{$branch}_upgrade_url"],
- "build" => $version_info->data["{$branch}_build_number"],
+ array("version" => $version_info->data["branch_{$branch}_version"],
+ "upgrade-url" => $version_info->data["branch_{$branch}_upgrade_url"],
+ "build" => $version_info->data["branch_{$branch}_build_number"],
"branch" => $branch,
"hide-url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))),
"upgrade_checker");
--
cgit v1.2.3
From 29be21bb0deaf70558b1aa02a115e67daefea0bd Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Mon, 17 Jan 2011 17:27:16 -0800
Subject: Add BUILD_NUMBER to the security check in .htaccess Change
BUILD_NUMBER to be .ini format and add a big "do not edit" comment.
---
.htaccess | 2 +-
BUILD_NUMBER | 7 ++++++-
modules/gallery/helpers/gallery.php | 4 ++--
3 files changed, 9 insertions(+), 4 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/.htaccess b/.htaccess
index 5a329520..771a8df0 100644
--- a/.htaccess
+++ b/.htaccess
@@ -29,7 +29,7 @@
# in your Apache2 config file before you uncomment this block or
# you'll get an "Internal Server Error".
#
-#
+#
# Order deny,allow
# Deny from all
#
diff --git a/BUILD_NUMBER b/BUILD_NUMBER
index 0691f67b..d32d51e9 100644
--- a/BUILD_NUMBER
+++ b/BUILD_NUMBER
@@ -1 +1,6 @@
-52
+; This file keeps track of the build number for the "master"
+; branch of gallery3. It's kept up to date by an automated
+; process. You don't need to edit it. In fact..
+;
+; DO NOT EDIT THIS FILE BY HAND!
+build_number=52
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index 31b342db..7a60f56a 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -205,7 +205,7 @@ class gallery_Core {
* Return the contents of the BUILD_NUMBER file, which should be a single integer.
*/
static function build_number() {
- $lines = file(DOCROOT . "BUILD_NUMBER", FILE_IGNORE_NEW_LINES);
- return $lines[0];
+ $result = parse_ini_file(DOCROOT . "BUILD_NUMBER");
+ return $result["build_number"];
}
}
\ No newline at end of file
--
cgit v1.2.3
From 76411d7d6d481bc2ab51e24ec2dbf003f43ce40b Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Mon, 17 Jan 2011 17:33:10 -0800
Subject: Rename BUILD_NUMBER to .build_number so it's not so loud.
---
.build_number | 6 ++++++
.gitattributes | 2 +-
BUILD_NUMBER | 6 ------
modules/gallery/helpers/gallery.php | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
create mode 100644 .build_number
delete mode 100644 BUILD_NUMBER
(limited to 'modules/gallery/helpers')
diff --git a/.build_number b/.build_number
new file mode 100644
index 00000000..d32d51e9
--- /dev/null
+++ b/.build_number
@@ -0,0 +1,6 @@
+; This file keeps track of the build number for the "master"
+; branch of gallery3. It's kept up to date by an automated
+; process. You don't need to edit it. In fact..
+;
+; DO NOT EDIT THIS FILE BY HAND!
+build_number=52
diff --git a/.gitattributes b/.gitattributes
index 9122eeb1..fdf9d072 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,2 @@
-BUILD_NUMBER merge=merge-keep-ours
+.build_number merge=merge-keep-ours
diff --git a/BUILD_NUMBER b/BUILD_NUMBER
deleted file mode 100644
index d32d51e9..00000000
--- a/BUILD_NUMBER
+++ /dev/null
@@ -1,6 +0,0 @@
-; This file keeps track of the build number for the "master"
-; branch of gallery3. It's kept up to date by an automated
-; process. You don't need to edit it. In fact..
-;
-; DO NOT EDIT THIS FILE BY HAND!
-build_number=52
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index 7a60f56a..ad9f40e8 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -202,10 +202,10 @@ class gallery_Core {
}
/**
- * Return the contents of the BUILD_NUMBER file, which should be a single integer.
+ * Return the contents of the .build_number file, which should be a single integer.
*/
static function build_number() {
- $result = parse_ini_file(DOCROOT . "BUILD_NUMBER");
+ $result = parse_ini_file(DOCROOT . ".build_number");
return $result["build_number"];
}
}
\ No newline at end of file
--
cgit v1.2.3
From 45caba09f81e53dfa4264bc74c4e6ed7935bd5f9 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Mon, 17 Jan 2011 20:03:11 -0800
Subject: Move the code that clears the upgrade_check site status message to
the upgrader so that it's cleared any time we run an upgrade. Part of
---
modules/gallery/controllers/upgrader.php | 3 +++
modules/gallery/helpers/gallery_installer.php | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/controllers/upgrader.php b/modules/gallery/controllers/upgrader.php
index 66c71648..0932090f 100644
--- a/modules/gallery/controllers/upgrader.php
+++ b/modules/gallery/controllers/upgrader.php
@@ -94,6 +94,9 @@ class Upgrader_Controller extends Controller {
// If the upgrade failed, this will get recreated
site_status::clear("upgrade_now");
+ // Clear any upgrade check strings, we are probably up to date.
+ site_status::clear("upgrade_check");
+
if (php_sapi_name() == "cli") {
if ($failed) {
print "Upgrade completed ** WITH FAILURES **\n";
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 41ed1c6e..1ffe9bae 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -677,9 +677,6 @@ class gallery_installer {
module::set_var("gallery", "upgrade_checker_auto_enabled", true);
module::set_version("gallery", $version = 46);
}
-
- // Clear any upgrade check strings, we are probably up to date.
- site_status::clear("upgrade_check");
}
static function uninstall() {
--
cgit v1.2.3
From 20ae106c22b9528d34fb85d09a7ab542e6c6c880 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Mon, 17 Jan 2011 21:15:33 -0800
Subject: Display a message in the "Check for Gallery upgrades" block when
there's a newer version available, even if the user has dismissed the site
status message. #1605.
---
.../gallery/controllers/admin_upgrade_checker.php | 9 ++++++-
modules/gallery/helpers/gallery_block.php | 1 +
modules/gallery/helpers/upgrade_checker.php | 31 +++++++---------------
.../gallery/views/upgrade_checker_block.html.php | 8 ++++++
themes/admin_wind/css/screen.css | 2 +-
5 files changed, 27 insertions(+), 24 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/modules/gallery/controllers/admin_upgrade_checker.php b/modules/gallery/controllers/admin_upgrade_checker.php
index 4b1467cd..456a982c 100644
--- a/modules/gallery/controllers/admin_upgrade_checker.php
+++ b/modules/gallery/controllers/admin_upgrade_checker.php
@@ -21,7 +21,14 @@ class Admin_Upgrade_Checker_Controller extends Admin_Controller {
function check_now() {
access::verify_csrf();
upgrade_checker::fetch_version_info();
- upgrade_checker::check_for_upgrade();
+ $message = upgrade_checker::get_upgrade_message();
+ if ($message) {
+ $message .= " [x]";
+ site_status::info($message, "upgrade_checker");
+ } else {
+ site_status::clear("upgrade_checker");
+ }
url::redirect("admin/dashboard");
}
diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php
index 2189a710..fed786cc 100644
--- a/modules/gallery/helpers/gallery_block.php
+++ b/modules/gallery/helpers/gallery_block.php
@@ -111,6 +111,7 @@ class gallery_block_Core {
$block->content = new View("upgrade_checker_block.html");
$block->content->version_info = upgrade_checker::version_info();
$block->content->auto_check_enabled = upgrade_checker::auto_check_enabled();
+ $block->content->new_version = upgrade_checker::get_upgrade_message();
}
return $block;
}
diff --git a/modules/gallery/helpers/upgrade_checker.php b/modules/gallery/helpers/upgrade_checker.php
index 0e72bb94..f92203c8 100644
--- a/modules/gallery/helpers/upgrade_checker.php
+++ b/modules/gallery/helpers/upgrade_checker.php
@@ -77,40 +77,27 @@ class upgrade_checker_Core {
/**
* Check the latest version info blob to see if it's time for an upgrade.
*/
- static function check_for_upgrade() {
+ static function get_upgrade_message() {
$version_info = upgrade_checker::version_info();
- $upgrade_available = false;
if ($version_info) {
if (gallery::RELEASE_CHANNEL == "release") {
if (version_compare($version_info->data["release_version"], gallery::VERSION, ">")) {
- site_status::warning(
- t("A newer version of Gallery is available! Upgrade now to version %version or wait until later.",
- array("version" => $version_info->data["release_version"],
- "upgrade-url" => $version_info->data["release_upgrade_url"],
- "hide-url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))),
- "upgrade_checker");
- $upgrade_available = true;
+ return t("A newer version of Gallery is available! Upgrade now to version %version",
+ array("version" => $version_info->data["release_version"],
+ "upgrade-url" => $version_info->data["release_upgrade_url"]));
}
} else {
$branch = gallery::RELEASE_BRANCH;
if (isset($version_info->data["branch_{$branch}_build_number"]) &&
version_compare($version_info->data["branch_{$branch}_build_number"],
gallery::build_number(), ">")) {
- site_status::warning(
- t("A newer version of Gallery is available! Upgrade now to version %version (build %build on branch %branch) or wait until later.",
- array("version" => $version_info->data["branch_{$branch}_version"],
- "upgrade-url" => $version_info->data["branch_{$branch}_upgrade_url"],
- "build" => $version_info->data["branch_{$branch}_build_number"],
- "branch" => $branch,
- "hide-url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))),
- "upgrade_checker");
- $upgrade_available = true;
+ return t("A newer version of Gallery is available! Upgrade now to version %version (build %build on branch %branch)",
+ array("version" => $version_info->data["branch_{$branch}_version"],
+ "upgrade-url" => $version_info->data["branch_{$branch}_upgrade_url"],
+ "build" => $version_info->data["branch_{$branch}_build_number"],
+ "branch" => $branch));
}
}
}
-
- if (!$upgrade_available) {
- site_status::clear("upgrade_checker");
- }
}
}
diff --git a/modules/gallery/views/upgrade_checker_block.html.php b/modules/gallery/views/upgrade_checker_block.html.php
index 30e18305..b04887b2 100644
--- a/modules/gallery/views/upgrade_checker_block.html.php
+++ b/modules/gallery/views/upgrade_checker_block.html.php
@@ -11,6 +11,14 @@
endif ?>
+ if ($new_version): ?>
+
+ -
+ = $new_version ?>
+
+
+ endif ?>
+
">
diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css
index 7d491cb7..a5376ff6 100644
--- a/themes/admin_wind/css/screen.css
+++ b/themes/admin_wind/css/screen.css
@@ -888,10 +888,10 @@ button {
background-position: .4em .3em;
border: 1px solid #ccc;
padding: 0;
+ margin-bottom: 1em;
}
#g-action-status {
- margin-bottom: 1em;
}
#g-action-status li,
--
cgit v1.2.3
From 423daa52d55a5298b461384baedc995eee09a0d1 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Fri, 21 Jan 2011 23:01:06 -0800
Subject: Update copyright to 2011.
---
application/Bootstrap.php | 2 +-
application/config/config.php | 2 +-
index.php | 2 +-
installer/cli.php | 2 +-
installer/index.php | 2 +-
installer/installer.php | 2 +-
installer/web.php | 2 +-
modules/akismet/controllers/admin_akismet.php | 2 +-
modules/akismet/helpers/akismet.php | 2 +-
modules/akismet/helpers/akismet_event.php | 2 +-
modules/akismet/helpers/akismet_installer.php | 2 +-
modules/akismet/tests/Akismet_Helper_Test.php | 2 +-
modules/comment/controllers/admin_comments.php | 2 +-
modules/comment/controllers/admin_manage_comments.php | 2 +-
modules/comment/controllers/comments.php | 2 +-
modules/comment/helpers/comment.php | 2 +-
modules/comment/helpers/comment_block.php | 2 +-
modules/comment/helpers/comment_event.php | 2 +-
modules/comment/helpers/comment_installer.php | 2 +-
modules/comment/helpers/comment_rest.php | 2 +-
modules/comment/helpers/comment_rss.php | 2 +-
modules/comment/helpers/comment_theme.php | 2 +-
modules/comment/helpers/comments_rest.php | 2 +-
modules/comment/helpers/item_comments_rest.php | 2 +-
modules/comment/models/comment.php | 2 +-
modules/comment/tests/Comment_Event_Test.php | 2 +-
modules/comment/tests/Comment_Helper_Test.php | 2 +-
modules/comment/tests/Comment_Model_Test.php | 2 +-
modules/digibug/config/digibug.php | 2 +-
modules/digibug/controllers/admin_digibug.php | 2 +-
modules/digibug/controllers/digibug.php | 2 +-
modules/digibug/helpers/digibug_event.php | 2 +-
modules/digibug/helpers/digibug_installer.php | 2 +-
modules/digibug/helpers/digibug_theme.php | 2 +-
modules/digibug/models/digibug_proxy.php | 2 +-
modules/digibug/tests/Digibug_Controller_Test.php | 2 +-
modules/exif/controllers/exif.php | 2 +-
modules/exif/helpers/exif.php | 2 +-
modules/exif/helpers/exif_event.php | 2 +-
modules/exif/helpers/exif_installer.php | 2 +-
modules/exif/helpers/exif_task.php | 2 +-
modules/exif/helpers/exif_theme.php | 2 +-
modules/exif/models/exif_key.php | 2 +-
modules/exif/models/exif_record.php | 2 +-
modules/exif/tests/Exif_Test.php | 2 +-
modules/g2_import/controllers/admin_g2_import.php | 2 +-
modules/g2_import/controllers/g2.php | 2 +-
modules/g2_import/helpers/g2_import.php | 2 +-
modules/g2_import/helpers/g2_import_event.php | 2 +-
modules/g2_import/helpers/g2_import_installer.php | 2 +-
modules/g2_import/helpers/g2_import_task.php | 2 +-
modules/g2_import/libraries/G2_Import_Exception.php | 2 +-
modules/g2_import/models/g2_map.php | 2 +-
modules/gallery/config/cache.php | 2 +-
modules/gallery/config/cookie.php | 2 +-
modules/gallery/config/database.php | 2 +-
modules/gallery/config/locale.php | 2 +-
modules/gallery/config/log_file.php | 2 +-
modules/gallery/config/routes.php | 2 +-
modules/gallery/config/session.php | 2 +-
modules/gallery/config/upload.php | 2 +-
modules/gallery/config/user_agents.php | 2 +-
modules/gallery/controllers/admin.php | 2 +-
modules/gallery/controllers/admin_advanced_settings.php | 2 +-
modules/gallery/controllers/admin_dashboard.php | 2 +-
modules/gallery/controllers/admin_graphics.php | 2 +-
modules/gallery/controllers/admin_languages.php | 2 +-
modules/gallery/controllers/admin_maintenance.php | 2 +-
modules/gallery/controllers/admin_modules.php | 2 +-
modules/gallery/controllers/admin_sidebar.php | 2 +-
modules/gallery/controllers/admin_theme_options.php | 2 +-
modules/gallery/controllers/admin_themes.php | 2 +-
modules/gallery/controllers/admin_upgrade_checker.php | 2 +-
modules/gallery/controllers/albums.php | 2 +-
modules/gallery/controllers/combined.php | 2 +-
modules/gallery/controllers/file_proxy.php | 2 +-
modules/gallery/controllers/items.php | 2 +-
modules/gallery/controllers/l10n_client.php | 2 +-
modules/gallery/controllers/login.php | 2 +-
modules/gallery/controllers/logout.php | 2 +-
modules/gallery/controllers/movies.php | 2 +-
modules/gallery/controllers/packager.php | 2 +-
modules/gallery/controllers/permissions.php | 2 +-
modules/gallery/controllers/photos.php | 2 +-
modules/gallery/controllers/quick.php | 2 +-
modules/gallery/controllers/reauthenticate.php | 2 +-
modules/gallery/controllers/upgrader.php | 2 +-
modules/gallery/controllers/uploader.php | 2 +-
modules/gallery/controllers/user_profile.php | 2 +-
modules/gallery/controllers/welcome_message.php | 2 +-
modules/gallery/helpers/MY_html.php | 2 +-
modules/gallery/helpers/MY_num.php | 2 +-
modules/gallery/helpers/MY_remote.php | 2 +-
modules/gallery/helpers/MY_url.php | 2 +-
modules/gallery/helpers/access.php | 2 +-
modules/gallery/helpers/album.php | 2 +-
modules/gallery/helpers/auth.php | 2 +-
modules/gallery/helpers/batch.php | 2 +-
modules/gallery/helpers/block_manager.php | 2 +-
modules/gallery/helpers/data_rest.php | 2 +-
modules/gallery/helpers/dir.php | 2 +-
modules/gallery/helpers/gallery.php | 2 +-
modules/gallery/helpers/gallery_block.php | 2 +-
modules/gallery/helpers/gallery_error.php | 2 +-
modules/gallery/helpers/gallery_event.php | 2 +-
modules/gallery/helpers/gallery_graphics.php | 2 +-
modules/gallery/helpers/gallery_installer.php | 2 +-
modules/gallery/helpers/gallery_rss.php | 2 +-
modules/gallery/helpers/gallery_task.php | 2 +-
modules/gallery/helpers/gallery_theme.php | 2 +-
modules/gallery/helpers/graphics.php | 2 +-
modules/gallery/helpers/identity.php | 2 +-
modules/gallery/helpers/item.php | 2 +-
modules/gallery/helpers/item_rest.php | 2 +-
modules/gallery/helpers/items_rest.php | 2 +-
modules/gallery/helpers/json.php | 2 +-
modules/gallery/helpers/l10n_client.php | 2 +-
modules/gallery/helpers/l10n_scanner.php | 2 +-
modules/gallery/helpers/locales.php | 2 +-
modules/gallery/helpers/log.php | 2 +-
modules/gallery/helpers/message.php | 2 +-
modules/gallery/helpers/model_cache.php | 2 +-
modules/gallery/helpers/module.php | 2 +-
modules/gallery/helpers/movie.php | 2 +-
modules/gallery/helpers/photo.php | 2 +-
modules/gallery/helpers/random.php | 2 +-
modules/gallery/helpers/site_status.php | 2 +-
modules/gallery/helpers/system.php | 2 +-
modules/gallery/helpers/task.php | 2 +-
modules/gallery/helpers/theme.php | 2 +-
modules/gallery/helpers/tree_rest.php | 2 +-
modules/gallery/helpers/upgrade_checker.php | 2 +-
modules/gallery/helpers/user_profile.php | 2 +-
modules/gallery/helpers/xml.php | 2 +-
modules/gallery/hooks/init_gallery.php | 2 +-
modules/gallery/libraries/Admin_View.php | 2 +-
modules/gallery/libraries/Block.php | 2 +-
modules/gallery/libraries/Form_Script.php | 2 +-
modules/gallery/libraries/Form_Uploadify.php | 2 +-
modules/gallery/libraries/Form_Uploadify_buttons.php | 2 +-
modules/gallery/libraries/Gallery_I18n.php | 2 +-
modules/gallery/libraries/Gallery_View.php | 2 +-
modules/gallery/libraries/IdentityProvider.php | 2 +-
modules/gallery/libraries/InPlaceEdit.php | 2 +-
modules/gallery/libraries/MY_Database.php | 2 +-
modules/gallery/libraries/MY_Forge.php | 2 +-
modules/gallery/libraries/MY_Input.php | 2 +-
modules/gallery/libraries/MY_Kohana_Exception.php | 2 +-
modules/gallery/libraries/MY_ORM.php | 2 +-
modules/gallery/libraries/MY_Pagination.php | 2 +-
modules/gallery/libraries/MY_View.php | 2 +-
modules/gallery/libraries/Menu.php | 2 +-
modules/gallery/libraries/ORM_MPTT.php | 2 +-
modules/gallery/libraries/SafeString.php | 2 +-
modules/gallery/libraries/Sendmail.php | 2 +-
modules/gallery/libraries/Task_Definition.php | 2 +-
modules/gallery/libraries/Theme_View.php | 2 +-
modules/gallery/libraries/drivers/Cache/Database.php | 2 +-
modules/gallery/libraries/drivers/IdentityProvider.php | 2 +-
modules/gallery/models/access_cache.php | 2 +-
modules/gallery/models/access_intent.php | 2 +-
modules/gallery/models/cache.php | 2 +-
modules/gallery/models/failed_auth.php | 2 +-
modules/gallery/models/graphics_rule.php | 2 +-
modules/gallery/models/incoming_translation.php | 2 +-
modules/gallery/models/item.php | 2 +-
modules/gallery/models/log.php | 2 +-
modules/gallery/models/message.php | 2 +-
modules/gallery/models/module.php | 2 +-
modules/gallery/models/outgoing_translation.php | 2 +-
modules/gallery/models/permission.php | 2 +-
modules/gallery/models/task.php | 2 +-
modules/gallery/models/theme.php | 2 +-
modules/gallery/models/var.php | 2 +-
modules/gallery/tests/Access_Helper_Test.php | 2 +-
modules/gallery/tests/Albums_Controller_Test.php | 2 +-
modules/gallery/tests/Cache_Test.php | 2 +-
modules/gallery/tests/Controller_Auth_Test.php | 2 +-
modules/gallery/tests/Database_Test.php | 2 +-
modules/gallery/tests/Dir_Helper_Test.php | 2 +-
modules/gallery/tests/DrawForm_Test.php | 2 +-
modules/gallery/tests/File_Structure_Test.php | 4 ++--
modules/gallery/tests/Gallery_Filters.php | 2 +-
modules/gallery/tests/Gallery_I18n_Test.php | 2 +-
modules/gallery/tests/Gallery_Installer_Test.php | 2 +-
modules/gallery/tests/Html_Helper_Test.php | 2 +-
modules/gallery/tests/Input_Library_Test.php | 2 +-
modules/gallery/tests/Item_Helper_Test.php | 2 +-
modules/gallery/tests/Item_Model_Test.php | 2 +-
modules/gallery/tests/Item_Rest_Helper_Test.php | 2 +-
modules/gallery/tests/Items_Rest_Helper_Test.php | 2 +-
modules/gallery/tests/Kohana_Exception_Test.php | 2 +-
modules/gallery/tests/Locales_Helper_Test.php | 2 +-
modules/gallery/tests/Menu_Test.php | 2 +-
modules/gallery/tests/ORM_MPTT_Test.php | 2 +-
modules/gallery/tests/Photos_Controller_Test.php | 2 +-
modules/gallery/tests/SafeString_Test.php | 2 +-
modules/gallery/tests/Sendmail_Test.php | 2 +-
modules/gallery/tests/Url_Security_Test.php | 2 +-
modules/gallery/tests/Var_Test.php | 2 +-
modules/gallery/tests/Xss_Security_Test.php | 2 +-
modules/gallery_unit_test/controllers/gallery_unit_test.php | 2 +-
modules/gallery_unit_test/helpers/MY_request.php | 2 +-
modules/gallery_unit_test/helpers/test.php | 2 +-
modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php | 2 +-
modules/image_block/helpers/image_block_block.php | 2 +-
modules/image_block/helpers/image_block_installer.php | 2 +-
modules/info/helpers/info_block.php | 2 +-
modules/info/helpers/info_installer.php | 2 +-
modules/info/helpers/info_theme.php | 2 +-
modules/kohana23_compat/config/pagination.php | 2 +-
modules/kohana23_compat/libraries/MY_Database_Builder.php | 2 +-
modules/kohana23_compat/libraries/Pagination.php | 2 +-
modules/notification/controllers/notification.php | 2 +-
modules/notification/helpers/notification.php | 2 +-
modules/notification/helpers/notification_event.php | 2 +-
modules/notification/helpers/notification_installer.php | 2 +-
modules/notification/models/pending_notification.php | 2 +-
modules/notification/models/subscription.php | 2 +-
modules/organize/controllers/organize.php | 2 +-
modules/organize/helpers/organize_event.php | 2 +-
modules/organize/helpers/organize_installer.php | 2 +-
modules/recaptcha/controllers/admin_recaptcha.php | 2 +-
modules/recaptcha/helpers/recaptcha.php | 2 +-
modules/recaptcha/helpers/recaptcha_event.php | 2 +-
modules/recaptcha/helpers/recaptcha_installer.php | 2 +-
modules/recaptcha/helpers/recaptcha_theme.php | 2 +-
modules/recaptcha/libraries/Form_Recaptcha.php | 2 +-
modules/rest/controllers/rest.php | 2 +-
modules/rest/helpers/registry_rest.php | 2 +-
modules/rest/helpers/rest.php | 2 +-
modules/rest/helpers/rest_event.php | 2 +-
modules/rest/helpers/rest_installer.php | 2 +-
modules/rest/libraries/Rest_Exception.php | 2 +-
modules/rest/models/user_access_key.php | 2 +-
modules/rest/tests/Rest_Controller_Test.php | 2 +-
modules/rss/controllers/rss.php | 2 +-
modules/rss/helpers/rss.php | 2 +-
modules/rss/helpers/rss_block.php | 2 +-
modules/search/controllers/search.php | 2 +-
modules/search/helpers/search.php | 2 +-
modules/search/helpers/search_event.php | 2 +-
modules/search/helpers/search_installer.php | 2 +-
modules/search/helpers/search_task.php | 2 +-
modules/search/helpers/search_theme.php | 2 +-
modules/search/models/search_record.php | 2 +-
modules/server_add/controllers/admin_server_add.php | 2 +-
modules/server_add/controllers/server_add.php | 2 +-
modules/server_add/helpers/server_add.php | 2 +-
modules/server_add/helpers/server_add_event.php | 2 +-
modules/server_add/helpers/server_add_installer.php | 2 +-
modules/server_add/helpers/server_add_theme.php | 2 +-
modules/server_add/models/server_add_entry.php | 2 +-
modules/slideshow/helpers/slideshow_event.php | 2 +-
modules/slideshow/helpers/slideshow_installer.php | 2 +-
modules/slideshow/helpers/slideshow_theme.php | 2 +-
modules/tag/controllers/admin_tags.php | 2 +-
modules/tag/controllers/tag.php | 2 +-
modules/tag/controllers/tags.php | 2 +-
modules/tag/helpers/item_tags_rest.php | 2 +-
modules/tag/helpers/tag.php | 2 +-
modules/tag/helpers/tag_block.php | 2 +-
modules/tag/helpers/tag_event.php | 2 +-
modules/tag/helpers/tag_installer.php | 2 +-
modules/tag/helpers/tag_item_rest.php | 2 +-
modules/tag/helpers/tag_items_rest.php | 2 +-
modules/tag/helpers/tag_rest.php | 2 +-
modules/tag/helpers/tag_rss.php | 2 +-
modules/tag/helpers/tag_task.php | 2 +-
modules/tag/helpers/tag_theme.php | 2 +-
modules/tag/helpers/tags_rest.php | 2 +-
modules/tag/models/tag.php | 2 +-
modules/tag/tests/Tag_Item_Rest_Helper_Test.php | 2 +-
modules/tag/tests/Tag_Rest_Helper_Test.php | 2 +-
modules/tag/tests/Tag_Test.php | 2 +-
modules/tag/tests/Tags_Rest_Helper_Test.php | 2 +-
modules/user/config/identity.php | 2 +-
modules/user/controllers/admin_users.php | 2 +-
modules/user/controllers/password.php | 2 +-
modules/user/controllers/users.php | 2 +-
modules/user/helpers/group.php | 2 +-
modules/user/helpers/user.php | 2 +-
modules/user/helpers/user_event.php | 2 +-
modules/user/helpers/user_installer.php | 2 +-
modules/user/helpers/user_theme.php | 2 +-
modules/user/libraries/drivers/IdentityProvider/Gallery.php | 2 +-
modules/user/models/group.php | 2 +-
modules/user/models/user.php | 2 +-
modules/user/tests/No_Direct_ORM_Access_Test.php | 2 +-
modules/user/tests/User_Groups_Test.php | 2 +-
modules/user/tests/User_Installer_Test.php | 2 +-
modules/watermark/controllers/admin_watermarks.php | 2 +-
modules/watermark/helpers/watermark.php | 2 +-
modules/watermark/helpers/watermark_event.php | 2 +-
modules/watermark/helpers/watermark_installer.php | 2 +-
295 files changed, 296 insertions(+), 296 deletions(-)
(limited to 'modules/gallery/helpers')
diff --git a/application/Bootstrap.php b/application/Bootstrap.php
index fbd83ce1..ff021fd5 100644
--- a/application/Bootstrap.php
+++ b/application/Bootstrap.php
@@ -1,7 +1,7 @@