summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/controllers/admin_manage_comments.php2
-rw-r--r--modules/digibug/controllers/digibug.php7
-rw-r--r--modules/g2_import/controllers/g2.php54
-rw-r--r--modules/gallery/controllers/admin_maintenance.php7
-rw-r--r--modules/gallery/controllers/packager.php5
-rw-r--r--modules/gallery/helpers/MY_remote.php3
-rw-r--r--modules/gallery/helpers/access.php14
-rw-r--r--modules/gallery/helpers/data_rest.php7
-rw-r--r--modules/gallery/helpers/gallery.php23
-rw-r--r--modules/gallery/helpers/gallery_installer.php7
-rw-r--r--modules/gallery/helpers/gallery_task.php7
-rw-r--r--modules/gallery/helpers/graphics.php9
-rw-r--r--modules/gallery/helpers/module.php55
-rw-r--r--modules/gallery/helpers/movie.php9
-rw-r--r--modules/gallery/libraries/InPlaceEdit.php2
-rw-r--r--modules/gallery/libraries/drivers/Cache/Database.php14
-rw-r--r--modules/gallery/models/item.php2
-rw-r--r--modules/gallery/module.info2
-rw-r--r--modules/gallery/tests/Cache_Test.php20
-rw-r--r--modules/gallery/tests/controller_auth_data.txt3
-rw-r--r--modules/gallery/tests/xss_data.txt84
-rw-r--r--modules/gallery/views/admin_advanced_settings.html.php1
-rw-r--r--modules/gallery/views/upgrader.html.php2
-rw-r--r--modules/slideshow/helpers/slideshow_theme.php2
-rw-r--r--modules/user/controllers/admin_users.php8
-rw-r--r--modules/user/models/group.php2
26 files changed, 163 insertions, 188 deletions
diff --git a/modules/comment/controllers/admin_manage_comments.php b/modules/comment/controllers/admin_manage_comments.php
index 0889dc4e..49bd85d5 100644
--- a/modules/comment/controllers/admin_manage_comments.php
+++ b/modules/comment/controllers/admin_manage_comments.php
@@ -25,7 +25,7 @@ class Admin_Manage_Comments_Controller extends Admin_Controller {
db::build()
->delete("comments")
->where("state", "IN", array("deleted", "spam"))
- ->where("updated", "<", "UNIX_TIMESTAMP() - 86400 * 7")
+ ->where("updated", "<", new Database_Expression("UNIX_TIMESTAMP() - 86400 * 7"))
->execute();
// Redirect to the appropriate queue
diff --git a/modules/digibug/controllers/digibug.php b/modules/digibug/controllers/digibug.php
index 3c2bb115..88d1ace0 100644
--- a/modules/digibug/controllers/digibug.php
+++ b/modules/digibug/controllers/digibug.php
@@ -95,16 +95,11 @@ class Digibug_Controller extends Controller {
if (!TEST_MODE) {
// Dump out the image
- header("Content-Type: $proxy->item->mime_type");
+ header("Content-Type: {$proxy->item->mime_type}");
Kohana::close_buffers(false);
$fd = fopen($file, "rb");
fpassthru($fd);
fclose($fd);
-
- // If the request was for the image and not the thumb, then delete the proxy.
- if ($type == "full") {
- $proxy->delete();
- }
}
$this->_clean_expired();
diff --git a/modules/g2_import/controllers/g2.php b/modules/g2_import/controllers/g2.php
index d260c9b4..0f51173a 100644
--- a/modules/g2_import/controllers/g2.php
+++ b/modules/g2_import/controllers/g2.php
@@ -34,38 +34,44 @@ class G2_Controller extends Controller {
$path = $input->get("path");
$id = $input->get("g2_itemId");
- if ($id) {
- // Requests by id are either core.DownloadItem or core.ShowItem requests. Later versions of
- // Gallery 2 don't specify g2_view if it's the default (core.ShowItem). And in some cases
- // (bbcode, embedding) people are using the id style URLs although URL rewriting is enabled.
- $where = array(array("g2_id", "=", $id));
- $view = $input->get("g2_view");
- if ($view) {
- $where[] = array("g2_url", "like", "%g2_view=$view%");
- } // else: Assuming that the first search hit is sufficiently good.
- } else if ($path) {
- $where = array(array("g2_url", "=", $path));
- } else {
- throw new Kohana_404_Exception();
- }
+ if ($path || $id) {
+ if ($id) {
+ // Requests by id are either core.DownloadItem or core.ShowItem requests. Later versions of
+ // Gallery 2 don't specify g2_view if it's the default (core.ShowItem). And in some cases
+ // (bbcode, embedding) people are using the id style URLs although URL rewriting is enabled.
+ $where = array(array("g2_id", "=", $id));
+ $view = $input->get("g2_view");
+ if ($view) {
+ $where[] = array("g2_url", "like", "%g2_view=$view%");
+ } // else: Assuming that the first search hit is sufficiently good.
+ } else if ($path) {
+ $where = array(array("g2_url", "IN", array($path, str_replace(" ", "+", $path))));
+ } else {
+ throw new Kohana_404_Exception();
+ }
- $g2_map = ORM::factory("g2_map")
- ->merge_where($where)
- ->find();
+ $g2_map = ORM::factory("g2_map")
+ ->merge_where($where)
+ ->find();
- if (!$g2_map->loaded()) {
- throw new Kohana_404_Exception();
- }
+ if (!$g2_map->loaded()) {
+ throw new Kohana_404_Exception();
+ }
- $item = ORM::factory("item", $g2_map->g3_id);
- if (!$item->loaded()) {
- throw new Kohana_404_Exception();
+ $item = ORM::factory("item", $g2_map->g3_id);
+ if (!$item->loaded()) {
+ throw new Kohana_404_Exception();
+ }
+ $resource_type = $g2_map->resource_type;
+ } else {
+ $item = item::root();
+ $resource_type = "album";
}
access::required("view", $item);
// Redirect the user to the new url
- switch ($g2_map->resource_type) {
+ switch ($resource_type) {
case "thumbnail":
url::redirect($item->thumb_url(true));
diff --git a/modules/gallery/controllers/admin_maintenance.php b/modules/gallery/controllers/admin_maintenance.php
index a9cc933c..7729d797 100644
--- a/modules/gallery/controllers/admin_maintenance.php
+++ b/modules/gallery/controllers/admin_maintenance.php
@@ -48,6 +48,13 @@ class Admin_Maintenance_Controller extends Admin_Controller {
$view->content->finished_tasks = ORM::factory("task")
->where("done", "=", 1)->order_by("updated", "DESC")->find_all();
print $view;
+
+ // Do some maintenance while we're in here
+ db::build()
+ ->delete("caches")
+ ->where("expiration", "<>", 0)
+ ->where("expiration", "<=", time())
+ ->execute();
}
/**
diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php
index f463d0de..bd51b93c 100644
--- a/modules/gallery/controllers/packager.php
+++ b/modules/gallery/controllers/packager.php
@@ -81,11 +81,6 @@ class Packager_Controller extends Controller {
Database::instance()->query("TRUNCATE {caches}");
Database::instance()->query("TRUNCATE {sessions}");
Database::instance()->query("TRUNCATE {logs}");
- db::build()
- ->delete("vars")
- ->where("module_name", "=", "gallery")
- ->where("name", "=", "_cache")
- ->execute();
db::build()->update("users")
->set(array("password" => ""))
->where("id", "in", array(1, 2))
diff --git a/modules/gallery/helpers/MY_remote.php b/modules/gallery/helpers/MY_remote.php
index 3e13ba8d..05341330 100644
--- a/modules/gallery/helpers/MY_remote.php
+++ b/modules/gallery/helpers/MY_remote.php
@@ -63,6 +63,9 @@ class remote extends remote_Core {
* WebHelper_simple::_parseLocation logic.
*/
static function do_request($url, $method='GET', $headers=array(), $body='') {
+ if (!array_key_exists("User-Agent", $headers)) {
+ $headers["User-Agent"] = "Gallery3";
+ }
/* Convert illegal characters */
$url = str_replace(' ', '%20', $url);
diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php
index 52a36298..1a448e4a 100644
--- a/modules/gallery/helpers/access.php
+++ b/modules/gallery/helpers/access.php
@@ -727,8 +727,18 @@ class access_Core {
fclose($fp);
}
- list ($response) = remote::do_request(url::abs_file("var/security_test/verify"));
- $works = $response == "HTTP/1.1 200 OK";
+ // Proxy our authorization headers so that if the entire Gallery is covered by Basic Auth
+ // this callback will still work.
+ $headers = array();
+ if (function_exists("apache_request_headers")) {
+ $arh = apache_request_headers();
+ if (!empty($arh["Authorization"])) {
+ $headers["Authorization"] = $arh["Authorization"];
+ }
+ }
+ list ($status, $headers, $body) =
+ remote::do_request(url::abs_file("var/security_test/verify"), "GET", $headers);
+ $works = ($status == "HTTP/1.1 200 OK") && ($body == "success");
} catch (Exception $e) {
@dir::unlink(VARPATH . "security_test");
throw $e;
diff --git a/modules/gallery/helpers/data_rest.php b/modules/gallery/helpers/data_rest.php
index 98c98894..791de9c0 100644
--- a/modules/gallery/helpers/data_rest.php
+++ b/modules/gallery/helpers/data_rest.php
@@ -72,7 +72,12 @@ class data_rest_Core {
header("Content-Type: {$item->mime_type}");
}
Kohana::close_buffers(false);
- readfile($file);
+
+ if (isset($p->encoding) && $p->encoding == "base64") {
+ print base64_encode(file_get_contents($file));
+ } else {
+ readfile($file);
+ }
// We must exit here to keep the regular REST framework reply code from adding more bytes on
// at the end or tinkering with headers.
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index ca8c92c9..b016f436 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -18,13 +18,17 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class gallery_Core {
- const VERSION = "3.0 RC2 (Santa Fe)";
+ const VERSION = "3.0 (Santa Fe)";
/**
* If Gallery is in maintenance mode, then force all non-admins to get routed to a "This site is
* down for maintenance" page.
*/
static function maintenance_mode() {
+ // @todo: we need a mechanism here to identify controllers that are still legally accessible
+ // when the entire Gallery is in maintenance mode. Perhaps a controller class function or
+ // method?
+ // https://sourceforge.net/apps/trac/gallery/ticket/1411
if (Router::$controller != "login" &&
Router::$controller != "combined" &&
module::get_var("gallery", "maintenance_mode", 0) &&
@@ -41,8 +45,12 @@ class gallery_Core {
* the login page.
*/
static function private_gallery() {
+ // @todo: we need a mechanism here to identify controllers that are still legally accessible
+ // when the entire Gallery is private. Perhaps a controller class function or method?
+ // https://sourceforge.net/apps/trac/gallery/ticket/1411
if (Router::$controller != "login" &&
Router::$controller != "combined" &&
+ Router::$controller != "digibug" &&
identity::active_user()->guest &&
!access::user_can(identity::guest(), "view", item::root()) &&
php_sapi_name() != "cli") {
@@ -140,4 +148,17 @@ class gallery_Core {
return $file_name;
}
+ /**
+ * Set the PATH environment variable to the paths specified.
+ * @param array Array of paths. Each array entry can contain a colon separated list of paths.
+ */
+ static function set_path_env($paths) {
+ $path_env = array();
+ foreach ($paths as $path) {
+ if ($path) {
+ array_push($path_env, $path);
+ }
+ }
+ putenv("PATH=" . implode(":", $path_env));
+ }
} \ No newline at end of file
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 83961d6b..3d82bc69 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -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", 40);
+ module::set_version("gallery", 41);
}
static function upgrade($version) {
@@ -637,6 +637,11 @@ class gallery_installer {
module::set_var("gallery", "extra_binary_paths", "/usr/local/bin:/opt/local/bin:/opt/bin");
module::set_version("gallery", $version = 40);
}
+
+ if ($version == 40) {
+ module::clear_var("gallery", "_cache");
+ module::set_version("gallery", $version = 41);
+ }
}
static function uninstall() {
diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php
index 3b173928..d56edabb 100644
--- a/modules/gallery/helpers/gallery_task.php
+++ b/modules/gallery/helpers/gallery_task.php
@@ -84,6 +84,13 @@ class gallery_task_Core {
$ignored = $task->get("ignored", array());
$i = 0;
+
+ // If there's no work left to do, skip to the end. This can happen if we resume a task long
+ // after the work got done in some other task.
+ if (!$result->count()) {
+ $completed = $total_count;
+ }
+
foreach ($result as $row) {
if (array_key_exists($row->id, $ignored)) {
continue;
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index 2868a28d..dd521d84 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -313,11 +313,10 @@ class graphics_Core {
$toolkits->graphicsmagick->installed = false;
$toolkits->graphicsmagick->error = t("GraphicsMagick requires the <b>exec</b> function");
} else {
- $graphics_path = module::get_var("gallery", "graphics_toolkit_path", null);
- $extra_binary_paths = module::get_var("gallery", "extra_binary_paths", null);
-
- putenv("PATH=" . getenv("PATH") . (empty($graphics_path) ? "" : ":$graphics_path") .
- ":" . $extra_binary_paths);
+ gallery::set_path_env(
+ array(module::get_var("gallery", "graphics_toolkit_path"),
+ getenv("PATH"),
+ module::get_var("gallery", "extra_binary_paths")));
// @todo: consider refactoring the two segments below into a loop since they are so
// similar.
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index 7863520e..64d0d1d6 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -425,48 +425,21 @@ class module_Core {
* @return the value
*/
static function get_var($module_name, $name, $default_value=null) {
- // We cache all vars in gallery._cache so that we can load all vars at once for
- // performance.
+ // We cache vars so we can load them all at once for performance.
if (empty(self::$var_cache)) {
- $row = db::build()
- ->select("value")
- ->from("vars")
- ->where("module_name", "=", "gallery")
- ->where("name", "=", "_cache")
- ->execute()
- ->current();
- if ($row) {
- self::$var_cache = unserialize($row->value);
- } else {
- // gallery._cache doesn't exist. Create it now.
+ self::$var_cache = Cache::instance()->get("var_cache");
+ if (empty(self::$var_cache)) {
+ // Cache doesn't exist, create it now.
foreach (db::build()
->select("module_name", "name", "value")
->from("vars")
->order_by("module_name")
->order_by("name")
->execute() as $row) {
- if ($row->module_name == "gallery" && $row->name == "_cache") {
- // This could happen if there's a race condition
- continue;
- }
// Mute the "Creating default object from empty value" warning below
@self::$var_cache->{$row->module_name}->{$row->name} = $row->value;
}
- $cache = ORM::factory("var");
- $cache->module_name = "gallery";
- $cache->name = "_cache";
- $cache->value = serialize(self::$var_cache);
- try {
- $cache->save();
- } catch (Database_Exception $e) {
- // There's a potential race condition here. Don't fail if that happens because it's
- // bound to be transient and not a huge deal, but at least put something in the logs.
- if (stristr($e->getMessage(), "duplicate entry")) {
- Kohana_Log::add("error", "Failed to cache vars");
- } else {
- throw $e;
- }
- }
+ Cache::instance()->set("var_cache", self::$var_cache, array("vars"));
}
}
@@ -495,11 +468,7 @@ class module_Core {
$var->value = $value;
$var->save();
- db::build()
- ->delete("vars")
- ->where("module_name", "=", "gallery")
- ->where("name", "=", "_cache")
- ->execute();
+ Cache::instance()->delete("var_cache");
self::$var_cache = null;
}
@@ -524,11 +493,7 @@ class module_Core {
->where("name", "=", $name)
->execute();
- db::build()
- ->delete("vars")
- ->where("module_name", "=", "gallery")
- ->where("name", "=", "_cache")
- ->execute();
+ Cache::instance()->delete("var_cache");
self::$var_cache = null;
}
@@ -546,11 +511,7 @@ class module_Core {
$var->delete();
}
- db::build()
- ->delete("vars")
- ->where("module_name", "=", "gallery")
- ->where("name", "=", "_cache")
- ->execute();
+ Cache::instance()->delete("var_cache");
self::$var_cache = null;
}
diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php
index 50339541..78358b6b 100644
--- a/modules/gallery/helpers/movie.php
+++ b/modules/gallery/helpers/movie.php
@@ -85,11 +85,10 @@ class movie_Core {
static function find_ffmpeg() {
if (!($ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) || !file_exists($ffmpeg_path)) {
- $graphics_path = module::get_var("gallery", "graphics_toolkit_path", null);
- $extra_binary_paths = module::get_var("gallery", "extra_binary_paths", null);
-
- putenv("PATH=" . getenv("PATH") . (empty($graphics_path) ? "" : ":$graphics_path") .
- ":" . $extra_binary_paths);
+ gallery::set_path_env(
+ array(module::get_var("gallery", "graphics_toolkit_path"),
+ getenv("PATH"),
+ module::get_var("gallery", "extra_binary_paths")));
if (function_exists("exec")) {
$ffmpeg_path = exec("which ffmpeg");
}
diff --git a/modules/gallery/libraries/InPlaceEdit.php b/modules/gallery/libraries/InPlaceEdit.php
index 7e631ab9..42eb2ffe 100644
--- a/modules/gallery/libraries/InPlaceEdit.php
+++ b/modules/gallery/libraries/InPlaceEdit.php
@@ -70,7 +70,7 @@ class InPlaceEdit_Core {
public function render() {
$v = new View("in_place_edit.html");
- $v->action = url::site($this->action);
+ $v->action = $this->action;
$v->form = $this->form;
$v->errors = $this->errors;
foreach ($v->errors as $key => $error) {
diff --git a/modules/gallery/libraries/drivers/Cache/Database.php b/modules/gallery/libraries/drivers/Cache/Database.php
index 9ada52e1..b7822811 100644
--- a/modules/gallery/libraries/drivers/Cache/Database.php
+++ b/modules/gallery/libraries/drivers/Cache/Database.php
@@ -179,20 +179,6 @@ class Cache_Database_Driver extends Cache_Driver {
}
/**
- * Deletes all cache files that are older than the current time.
- */
- public function delete_expired() {
- // Delete all expired caches
- $status = db::build()
- ->delete("caches")
- ->where("expiration", "<>", 0)
- ->where("expiration", "<=", time())
- ->execute();
-
- return count($status) > 0;
- }
-
- /**
* Empty the cache
*/
public function delete_all() {
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 7bcf1f31..07f781d1 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -498,7 +498,7 @@ class Item_Model_Core extends ORM_MPTT {
$base_slug = $this->slug;
while (ORM::factory("item")
->where("parent_id", "=", $this->parent_id)
- ->where("id", "<>", $this->id)
+ ->where("id", $this->id ? "<>" : "IS NOT", $this->id)
->and_open()
->where("name", "=", $this->name)
->or_where("slug", "=", $this->slug)
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index 1155ddf7..2b684e5e 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -1,3 +1,3 @@
name = "Gallery 3"
description = "Gallery core application"
-version = 40
+version = 41
diff --git a/modules/gallery/tests/Cache_Test.php b/modules/gallery/tests/Cache_Test.php
index 4c65698a..e8d8b6f4 100644
--- a/modules/gallery/tests/Cache_Test.php
+++ b/modules/gallery/tests/Cache_Test.php
@@ -85,26 +85,6 @@ class Cache_Test extends Gallery_Unit_Test_Case {
$this->assert_equal(array($id3 => $value3), $data, "Expected id3");
}
- public function cache_delete_expired_test() {
- $id1 = md5(rand());
- $value1 = array("field1" => "value1", "field2" => "value2");
- $this->_driver->set(array($id1 => $value1), array("tag1", "tag2"), -84600);
-
- $id2 = md5(rand());
- $value2 = array("field3" => "value3", "field4" => "value4");
- $this->_driver->set(array($id2 => $value2), array("tag2", "tag3"), -846000);
-
- $id3 = md5(rand());
- $value3 = array("field5" => "value5", "field6" => "value6");
- $this->_driver->set(array($id3 => $value3), array("tag3", "tag4"), -84600);
-
- $data = $this->_driver->delete_expired();
-
- $this->assert_false($this->_driver->exists($id1), "$id1 should have been deleted");
- $this->assert_false($this->_driver->exists($id2), "$id2 should have been deleted");
- $this->assert_false($this->_driver->exists($id3), "$id3 should have been deleted");
- }
-
public function cache_delete_id_test() {
$id1 = md5(rand());
$value1 = array("field1" => "value1", "field2" => "value2");
diff --git a/modules/gallery/tests/controller_auth_data.txt b/modules/gallery/tests/controller_auth_data.txt
index 03032fd9..24170092 100644
--- a/modules/gallery/tests/controller_auth_data.txt
+++ b/modules/gallery/tests/controller_auth_data.txt
@@ -1,7 +1,6 @@
modules/comment/controllers/admin_manage_comments.php queue DIRTY_CSRF
modules/comment/helpers/comment_rss.php feed DIRTY_AUTH
modules/digibug/controllers/digibug.php print_proxy DIRTY_CSRF|DIRTY_AUTH
-modules/digibug/controllers/digibug.php close_window DIRTY_AUTH
modules/g2_import/controllers/g2.php map DIRTY_CSRF
modules/gallery/controllers/admin.php __call DIRTY_AUTH
modules/gallery/controllers/albums.php index DIRTY_AUTH
@@ -34,7 +33,7 @@ modules/search/controllers/search.php index
modules/server_add/controllers/admin_server_add.php autocomplete DIRTY_CSRF
modules/server_add/controllers/server_add.php children DIRTY_CSRF
modules/tag/controllers/admin_tags.php index DIRTY_CSRF
-modules/tag/controllers/tags.php show DIRTY_CSRF|DIRTY_AUTH
+modules/tag/controllers/tag.php __call DIRTY_CSRF|DIRTY_AUTH
modules/tag/controllers/tags.php autocomplete DIRTY_CSRF|DIRTY_AUTH
modules/user/controllers/password.php reset DIRTY_AUTH
modules/user/controllers/password.php do_reset DIRTY_CSRF|DIRTY_AUTH
diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt
index 6821c963..0345df96 100644
--- a/modules/gallery/tests/xss_data.txt
+++ b/modules/gallery/tests/xss_data.txt
@@ -43,8 +43,8 @@ modules/digibug/views/digibug_form.html.php 6 DIRTY form::
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 9 DIRTY $form
-modules/gallery/views/admin_advanced_settings.html.php 21 DIRTY_ATTR text::alternate("g-odd","g-even")
-modules/gallery/views/admin_advanced_settings.html.php 22 DIRTY $var->module_name
+modules/gallery/views/admin_advanced_settings.html.php 20 DIRTY_ATTR text::alternate("g-odd","g-even")
+modules/gallery/views/admin_advanced_settings.html.php 21 DIRTY $var->module_name
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)
modules/gallery/views/admin_block_log_entries.html.php 10 DIRTY gallery::date_time($entry->timestamp)
@@ -58,9 +58,9 @@ modules/gallery/views/admin_block_photo_stream.html.php 6 DIRTY photo:
modules/gallery/views/admin_block_photo_stream.html.php 7 DIRTY_ATTR $photo->thumb_url()
modules/gallery/views/admin_dashboard.html.php 5 DIRTY_JS $csrf
modules/gallery/views/admin_dashboard.html.php 35 DIRTY $blocks
-modules/gallery/views/admin_graphics.html.php 24 DIRTY newView("admin_graphics_none.html")
-modules/gallery/views/admin_graphics.html.php 26 DIRTY newView("admin_graphics_$active.html",array("tk"=>$tk->$active,"is_active"=>true))
-modules/gallery/views/admin_graphics.html.php 33 DIRTY newView("admin_graphics_$id.html",array("tk"=>$tk->$id,"is_active"=>false))
+modules/gallery/views/admin_graphics.html.php 25 DIRTY newView("admin_graphics_none.html")
+modules/gallery/views/admin_graphics.html.php 27 DIRTY newView("admin_graphics_$active.html",array("tk"=>$tk->$active,"is_active"=>true))
+modules/gallery/views/admin_graphics.html.php 34 DIRTY newView("admin_graphics_$id.html",array("tk"=>$tk->$id,"is_active"=>false))
modules/gallery/views/admin_graphics_gd.html.php 2 DIRTY_ATTR $is_active?" g-selected":""
modules/gallery/views/admin_graphics_gd.html.php 2 DIRTY_ATTR $tk->installed?" g-installed-toolkit":" g-unavailable"
modules/gallery/views/admin_graphics_gd.html.php 19 DIRTY $tk->error
@@ -274,19 +274,19 @@ modules/notification/views/item_updated.html.php 20 DIRTY_JS $item-
modules/notification/views/item_updated.html.php 20 DIRTY $item->abs_url()
modules/notification/views/user_profile_notification.html.php 5 DIRTY_ATTR $subscription->id
modules/notification/views/user_profile_notification.html.php 6 DIRTY_JS $subscription->url
-modules/organize/views/organize_dialog.html.php 90 DIRTY_JS $domain
-modules/organize/views/organize_dialog.html.php 91 DIRTY_JS $access_key
-modules/organize/views/organize_dialog.html.php 92 DIRTY_JS request::protocol()
-modules/organize/views/organize_dialog.html.php 93 DIRTY_JS $file_filter
-modules/organize/views/organize_dialog.html.php 94 DIRTY_JS $sort_order
-modules/organize/views/organize_dialog.html.php 95 DIRTY_JS $sort_fields
-modules/organize/views/organize_dialog.html.php 96 DIRTY_JS $album->id
-modules/organize/views/organize_dialog.html.php 97 DIRTY_JS $selected_id
-modules/organize/views/organize_dialog.html.php 98 DIRTY_JS $rest_uri
-modules/organize/views/organize_dialog.html.php 99 DIRTY_JS $controller_uri
-modules/organize/views/organize_dialog.html.php 105 DIRTY_JS $flash_minimum_version="10.0.0"
-modules/organize/views/organize_dialog.html.php 123 DIRTY_JS $swf_uri
-modules/organize/views/organize_dialog.html.php 136 DIRTY_ATTR request::protocol()
+modules/organize/views/organize_dialog.html.php 94 DIRTY_JS $domain
+modules/organize/views/organize_dialog.html.php 95 DIRTY_JS $access_key
+modules/organize/views/organize_dialog.html.php 96 DIRTY_JS request::protocol()
+modules/organize/views/organize_dialog.html.php 97 DIRTY_JS $file_filter
+modules/organize/views/organize_dialog.html.php 98 DIRTY_JS $sort_order
+modules/organize/views/organize_dialog.html.php 99 DIRTY_JS $sort_fields
+modules/organize/views/organize_dialog.html.php 100 DIRTY_JS $album->id
+modules/organize/views/organize_dialog.html.php 101 DIRTY_JS $selected_id
+modules/organize/views/organize_dialog.html.php 102 DIRTY_JS $rest_uri
+modules/organize/views/organize_dialog.html.php 103 DIRTY_JS $controller_uri
+modules/organize/views/organize_dialog.html.php 109 DIRTY_JS $flash_minimum_version="10.0.0"
+modules/organize/views/organize_dialog.html.php 127 DIRTY_JS $swf_uri
+modules/organize/views/organize_dialog.html.php 140 DIRTY_ATTR request::protocol()
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
@@ -355,19 +355,19 @@ modules/user/views/admin_users_group.html.php 24 DIRTY_JS $group
modules/watermark/views/admin_watermarks.html.php 20 DIRTY_ATTR $width
modules/watermark/views/admin_watermarks.html.php 20 DIRTY_ATTR $height
modules/watermark/views/admin_watermarks.html.php 20 DIRTY_ATTR $url
-themes/admin_wind/views/admin.html.php 22 DIRTY_JS $theme->url()
-themes/admin_wind/views/admin.html.php 39 DIRTY $theme->admin_head()
-themes/admin_wind/views/admin.html.php 43 DIRTY $theme->admin_page_top()
-themes/admin_wind/views/admin.html.php 51 DIRTY $theme->admin_header_top()
-themes/admin_wind/views/admin.html.php 52 DIRTY_JS item::root()->url()
-themes/admin_wind/views/admin.html.php 55 DIRTY $theme->user_menu()
-themes/admin_wind/views/admin.html.php 58 DIRTY $theme->admin_menu()
-themes/admin_wind/views/admin.html.php 61 DIRTY $theme->admin_header_bottom()
-themes/admin_wind/views/admin.html.php 68 DIRTY $content
-themes/admin_wind/views/admin.html.php 74 DIRTY $sidebar
-themes/admin_wind/views/admin.html.php 79 DIRTY $theme->admin_footer()
-themes/admin_wind/views/admin.html.php 82 DIRTY $theme->admin_credits()
-themes/admin_wind/views/admin.html.php 87 DIRTY $theme->admin_page_bottom()
+themes/admin_wind/views/admin.html.php 21 DIRTY_JS $theme->url()
+themes/admin_wind/views/admin.html.php 38 DIRTY $theme->admin_head()
+themes/admin_wind/views/admin.html.php 42 DIRTY $theme->admin_page_top()
+themes/admin_wind/views/admin.html.php 50 DIRTY $theme->admin_header_top()
+themes/admin_wind/views/admin.html.php 51 DIRTY_JS item::root()->url()
+themes/admin_wind/views/admin.html.php 54 DIRTY $theme->user_menu()
+themes/admin_wind/views/admin.html.php 57 DIRTY $theme->admin_menu()
+themes/admin_wind/views/admin.html.php 60 DIRTY $theme->admin_header_bottom()
+themes/admin_wind/views/admin.html.php 67 DIRTY $content
+themes/admin_wind/views/admin.html.php 73 DIRTY $sidebar
+themes/admin_wind/views/admin.html.php 78 DIRTY $theme->admin_footer()
+themes/admin_wind/views/admin.html.php 81 DIRTY $theme->admin_credits()
+themes/admin_wind/views/admin.html.php 86 DIRTY $theme->admin_page_bottom()
themes/admin_wind/views/block.html.php 3 DIRTY_ATTR $anchor
themes/admin_wind/views/block.html.php 5 DIRTY $id
themes/admin_wind/views/block.html.php 5 DIRTY_ATTR $css_id
@@ -399,17 +399,17 @@ themes/wind/views/dynamic.html.php 29 DIRTY $theme
themes/wind/views/movie.html.php 5 DIRTY $theme->paginator()
themes/wind/views/movie.html.php 9 DIRTY $item->movie_img(array("class"=>"g-movie","id"=>"g-item-id-{$item->id}"))
themes/wind/views/page.html.php 9 DIRTY $page_title
-themes/wind/views/page.html.php 33 DIRTY_JS $theme->url()
-themes/wind/views/page.html.php 42 DIRTY $new_width
-themes/wind/views/page.html.php 43 DIRTY $new_height
-themes/wind/views/page.html.php 44 DIRTY $thumb_proportion
-themes/wind/views/page.html.php 81 DIRTY $header_text
-themes/wind/views/page.html.php 83 DIRTY_JS item::root()->url()
-themes/wind/views/page.html.php 87 DIRTY $theme->user_menu()
-themes/wind/views/page.html.php 108 DIRTY_JS $parent->url($parent->id==$theme->item()->parent_id?"show={$theme->item()->id}":null)
-themes/wind/views/page.html.php 129 DIRTY $content
-themes/wind/views/page.html.php 135 DIRTY newView("sidebar.html")
-themes/wind/views/page.html.php 142 DIRTY $footer_text
+themes/wind/views/page.html.php 32 DIRTY_JS $theme->url()
+themes/wind/views/page.html.php 41 DIRTY $new_width
+themes/wind/views/page.html.php 42 DIRTY $new_height
+themes/wind/views/page.html.php 43 DIRTY $thumb_proportion
+themes/wind/views/page.html.php 80 DIRTY $header_text
+themes/wind/views/page.html.php 82 DIRTY_JS item::root()->url()
+themes/wind/views/page.html.php 86 DIRTY $theme->user_menu()
+themes/wind/views/page.html.php 107 DIRTY_JS $parent->url($parent->id==$theme->item()->parent_id?"show={$theme->item()->id}":null)
+themes/wind/views/page.html.php 128 DIRTY $content
+themes/wind/views/page.html.php 134 DIRTY newView("sidebar.html")
+themes/wind/views/page.html.php 141 DIRTY $footer_text
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
diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php
index 1f7d2f64..edaeecaf 100644
--- a/modules/gallery/views/admin_advanced_settings.html.php
+++ b/modules/gallery/views/admin_advanced_settings.html.php
@@ -17,7 +17,6 @@
<th> <?= t("Value") ?></th>
</tr>
<? foreach ($vars as $var): ?>
- <? if ($var->module_name == "gallery" && $var->name == "_cache") continue ?>
<tr class="<?= text::alternate("g-odd", "g-even") ?>">
<td> <?= $var->module_name ?> </td>
<td> <?= html::clean($var->name) ?> </td>
diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php
index 1ec49c77..ad2e3421 100644
--- a/modules/gallery/views/upgrader.html.php
+++ b/modules/gallery/views/upgrader.html.php
@@ -17,7 +17,7 @@
<a id="dialog_close_link" style="display: none" onclick="$('#dialog').fadeOut(); return false;" href="#" class="close">[x]</a>
<div id="busy" style="display: none">
<h1>
- <img width="16" height="16" src="<?= url::file("lib/images/loading-small.gif") ?>"/>
+ <img width="16" height="16" src="<?= url::file("themes/wind/images/loading-small.gif") ?>"/>
<?= t("Upgrade in progress!") ?>
</h1>
<p>
diff --git a/modules/slideshow/helpers/slideshow_theme.php b/modules/slideshow/helpers/slideshow_theme.php
index 3203b7bc..a3d6ef37 100644
--- a/modules/slideshow/helpers/slideshow_theme.php
+++ b/modules/slideshow/helpers/slideshow_theme.php
@@ -20,7 +20,7 @@
class slideshow_theme_Core {
static function page_bottom($theme) {
$proto = request::protocol();
- return "<script src=\"$proto://apps.cooliris.com/slideshow/go.js\" " .
+ return "<script src=\"$proto://e.cooliris.com/slideshow/v/37732/go.js\" " .
"type=\"text/javascript\"></script>";
}
}
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index c22fcc2e..23032ab3 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -381,8 +381,8 @@ class Admin_Users_Controller extends Admin_Controller {
$form_group->inputs["name"]->error_messages("conflict", t("There is already a group with that name"))
->error_messages("required", t("You must enter a group name"))
->error_messages("length",
- t("The group name must be between %min_length and %max_length characters",
- array("min_length" => 4, "max_length" => 255)));
+ t("The group name must be less than %max_length characters",
+ array("max_length" => 255)));
$form_group->submit("")->value(t("Save"));
return $form;
}
@@ -392,9 +392,7 @@ class Admin_Users_Controller extends Admin_Controller {
$form_group = $form->group("add_group")->label(t("Add group"));
$form_group->input("name")->label(t("Name"))->id("g-name");
$form_group->inputs["name"]->error_messages("conflict", t("There is already a group with that name"))
- ->error_messages("required", t("You must enter a group name"))
- ->error_messages("length", t("The group name must be at least %min_length characters",
- array("min_length" => 4)));
+ ->error_messages("required", t("You must enter a group name"));
$form_group->submit("")->value(t("Add group"));
return $form;
}
diff --git a/modules/user/models/group.php b/modules/user/models/group.php
index 57b12963..b27c7250 100644
--- a/modules/user/models/group.php
+++ b/modules/user/models/group.php
@@ -41,7 +41,7 @@ class Group_Model extends ORM implements Group_Definition {
// validate() is recursive, only modify the rules on the outermost call.
if (!$array) {
$this->rules = array(
- "name" => array("rules" => array("required", "length[4,255]"),
+ "name" => array("rules" => array("required", "length[1,255]"),
"callbacks" => array(array($this, "valid_name"))));
}