summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment/helpers/comment_theme.php4
-rw-r--r--modules/digibug/helpers/digibug_theme.php2
-rw-r--r--modules/gallery/controllers/javascript.php62
-rw-r--r--modules/gallery/helpers/gallery_installer.php49
-rw-r--r--modules/gallery/helpers/gallery_theme.php34
-rw-r--r--modules/gallery/libraries/Theme_View.php74
-rw-r--r--modules/gallery/libraries/drivers/Cache/Database.php18
-rw-r--r--modules/gallery/module.info2
-rw-r--r--modules/organize/helpers/organize_theme.php8
-rw-r--r--modules/server_add/helpers/server_add_theme.php6
-rw-r--r--modules/tag/helpers/tag_theme.php7
-rw-r--r--modules/tag/views/admin_tags.html.php1
-rw-r--r--modules/user/helpers/user_theme.php5
-rw-r--r--themes/admin_default/views/admin.html.php10
-rw-r--r--themes/default/views/movie.html.php1
-rw-r--r--themes/default/views/page.html.php12
-rw-r--r--themes/default/views/photo.html.php1
17 files changed, 220 insertions, 76 deletions
diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php
index d9f1acf4..89b2f57c 100644
--- a/modules/comment/helpers/comment_theme.php
+++ b/modules/comment/helpers/comment_theme.php
@@ -19,8 +19,8 @@
*/
class comment_theme_Core {
static function head($theme) {
- $url = url::file("modules/comment/js/comment.js");
- return "<script src=\"$url\" type=\"text/javascript\"></script>\n";
+ $theme->script("modules/comment/js/comment.js");
+ return "";
}
static function photo_bottom($theme) {
diff --git a/modules/digibug/helpers/digibug_theme.php b/modules/digibug/helpers/digibug_theme.php
index 3b5be3b3..f94d07c6 100644
--- a/modules/digibug/helpers/digibug_theme.php
+++ b/modules/digibug/helpers/digibug_theme.php
@@ -19,6 +19,6 @@
*/
class digibug_theme_Core {
static function head($theme) {
- return html::script("modules/digibug/js/digibug.js");
+ $theme->script("modules/digibug/js/digibug.js");
}
}
diff --git a/modules/gallery/controllers/javascript.php b/modules/gallery/controllers/javascript.php
new file mode 100644
index 00000000..ba5cbf4b
--- /dev/null
+++ b/modules/gallery/controllers/javascript.php
@@ -0,0 +1,62 @@
+<?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 Javascript_Controller extends Controller {
+ public function combined($key) {
+ if (preg_match('/[^0-9a-f]/', $key)) {
+ // The key can't contain non-hex, so just terminate early
+ Kohana::show_404();
+ }
+
+ // We don't need to save the session for this request
+ Session::abort_save();
+
+ // Our data is immutable, so if they already have a copy then it needs no updating.
+ if (!empty($_SERVER["HTTP_IF_MODIFIED_SINCE"])) {
+ header('HTTP/1.0 304 Not Modified');
+ return;
+ }
+
+ $cache = Cache::instance();
+ if (strpos($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") !== false ) {
+ $content = $cache->get("{$key}_gz");
+ }
+
+ if (empty($content)) {
+ $content = $cache->get($key);
+ }
+
+ if (empty($content)) {
+ Kohana::show_404();
+ }
+
+ if (strpos($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") !== false) {
+ header("Content-Encoding: gzip");
+ header("Cache-Control: public");
+ }
+
+ header("Content-Type: text/javascript; charset=UTF-8");
+ header("Expires: Tue, 19 Jan 2038 00:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s T", time()));
+
+ Kohana::close_buffers(false);
+ print $content;
+ }
+}
+
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 92fc662d..c3c3543c 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -32,6 +32,16 @@ class gallery_installer {
PRIMARY KEY (`id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+ $db->query("CREATE TABLE {caches} (
+ `id` int(9) NOT NULL auto_increment,
+ `key` varchar(255) NOT NULL,
+ `tags` varchar(255),
+ `expiration` int(9) NOT NULL,
+ `cache` longblob,
+ PRIMARY KEY (`id`),
+ KEY (`tags`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+
$db->query("CREATE TABLE {graphics_rules} (
`id` int(9) NOT NULL auto_increment,
`active` BOOLEAN default 0,
@@ -181,15 +191,6 @@ class gallery_installer {
UNIQUE KEY(`module_name`, `name`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- $db->query("CREATE TABLE {caches} (
- `id` varchar(255) NOT NULL,
- `tags` varchar(255),
- `expiration` int(9) NOT NULL,
- `cache` text,
- PRIMARY KEY (`id`),
- KEY (`tags`))
- ENGINE=InnoDB DEFAULT CHARSET=utf8;");
-
foreach (array("albums", "logs", "modules", "resizes", "thumbs", "tmp", "uploads") as $dir) {
@mkdir(VARPATH . $dir);
}
@@ -258,7 +259,7 @@ class gallery_installer {
module::set_var("gallery", "show_credits", 1);
// @todo this string needs to be picked up by l10n_scanner
module::set_var("gallery", "credits", "Powered by <a href=\"%url\">Gallery %version</a>");
- module::set_version("gallery", 4);
+ module::set_version("gallery", 5);
}
static function upgrade($version) {
@@ -278,15 +279,29 @@ class gallery_installer {
if ($version == 3) {
$db->query("CREATE TABLE {caches} (
- `id` varchar(255) NOT NULL,
- `tags` varchar(255),
- `expiration` int(9) NOT NULL,
- `cache` text,
- PRIMARY KEY (`id`),
- KEY (`tags`))
- ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+ `id` varchar(255) NOT NULL,
+ `tags` varchar(255),
+ `expiration` int(9) NOT NULL,
+ `cache` text,
+ PRIMARY KEY (`id`),
+ KEY (`tags`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
module::set_version("gallery", $version = 4);
}
+
+ if ($version == 4) {
+ Cache::instance()->delete_all();
+ $db->query("ALTER TABLE {caches} MODIFY COLUMN `cache` LONGBLOB");
+ module::set_version("gallery", $version = 5);
+ }
+
+ if ($version == 5) {
+ Cache::instance()->delete_all();
+ $db->query("ALTER TABLE {caches} DROP COLUMN `id`");
+ $db->query("ALTER TABLE {caches} ADD COLUMN `key` varchar(255) NOT NULL");
+ $db->query("ALTER TABLE {caches} ADD COLUMN `id` int(9) NOT NULL auto_increment PRIMARY KEY");
+ module::set_version("gallery", $version = 6);
+ }
}
static function uninstall() {
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index a96c8f5b..b6b24b27 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -21,6 +21,22 @@ class gallery_theme_Core {
static function head($theme) {
$session = Session::instance();
$buf = "";
+ $theme->script("lib/jquery.js");
+ $theme->script("lib/jquery.form.js");
+ $theme->script("lib/jquery-ui.js");
+ $theme->script("lib/gallery.common.js");
+ $theme->script("lib/gallery.dialog.js");
+ $theme->script("lib/gallery.form.js");
+ $theme->script("lib/superfish/js/superfish.js");
+ if ($theme->page_type == 'photo') {
+ $theme->script("lib/jquery.scrollTo.js");
+ $theme->script("lib/jquery.localscroll.js");
+ $theme->script("lib/gallery.show_full_size.js");
+ }
+ if ($theme->page_type == 'movie') {
+ $theme->script("lib/flowplayer.js");
+ }
+ $theme->script($theme->url("js/ui.init.js", false, true));
if ($session->get("debug")) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("modules/gallery/css/debug.css") . "\" />";
@@ -29,7 +45,7 @@ class gallery_theme_Core {
&& access::can("edit", $theme->item())) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("modules/gallery/css/quick.css") . "\" />";
- $buf .= html::script("modules/gallery/js/quick.js");
+ $theme->script("modules/gallery/js/quick.js");
}
if (module::is_active("rss")) {
@@ -43,8 +59,8 @@ class gallery_theme_Core {
if ($session->get("l10n_mode", false)) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("modules/gallery/css/l10n_client.css") . "\" />";
- $buf .= html::script("lib/jquery.cookie.js");
- $buf .= html::script("modules/gallery/js/l10n_client.js");
+ $theme->script("lib/jquery.cookie.js");
+ $theme->script("modules/gallery/js/l10n_client.js");
}
return $buf;
@@ -79,6 +95,14 @@ class gallery_theme_Core {
static function admin_head($theme) {
$session = Session::instance();
$buf = "";
+ $theme->script("lib/jquery.js");
+ $theme->script("lib/jquery.form.js");
+ $theme->script("lib/jquery-ui.js");
+ $theme->script("lib/gallery.common.js");
+ $theme->script("lib/gallery.dialog.js");
+ $theme->script("lib/superfish/js/superfish.js");
+ $theme->script($theme->url("js/jquery.dropshadow.js", false, true));
+ $theme->script($theme->url("js/ui.init.js", false, true));
if ($session->get("debug")) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("modules/gallery/css/debug.css") . "\" />";
@@ -87,8 +111,8 @@ class gallery_theme_Core {
if ($session->get("l10n_mode", false)) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("modules/gallery/css/l10n_client.css") . "\" />";
- $buf .= html::script("lib/jquery.cookie.js");
- $buf .= html::script("modules/gallery/js/l10n_client.js");
+ $theme->script("lib/jquery.cookie.js");
+ $theme->script("modules/gallery/js/l10n_client.js");
}
return $buf;
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 4612a74b..c3acfeb3 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -19,6 +19,7 @@
*/
class Theme_View_Core extends View {
private $theme_name = null;
+ private $scripts = array();
/**
* Attempts to load a view and pre-load view data.
@@ -68,9 +69,9 @@ class Theme_View_Core extends View {
return module::get_var("gallery", "thumb_size", 200) / 200;
}
- public function url($path, $absolute_url=false) {
+ public function url($path, $absolute_url=false, $no_root=false) {
$arg = "themes/{$this->theme_name}/$path";
- return $absolute_url ? url::abs_file($arg) : url::file($arg);
+ return $absolute_url ? url::abs_file($arg) : $no_root ? $arg : url::file($arg);
}
public function item() {
@@ -167,6 +168,49 @@ class Theme_View_Core extends View {
return message::get();
}
+ public function script($file) {
+ $this->scripts[$file] = 1;
+ }
+
+ /**
+ * Combine a series of Javascript files into a single one and cache it in the database, then
+ * return a single <script> element to refer to it.
+ */
+ private function _combine_script() {
+ $links = array();
+ $key = "";
+ foreach (array_keys($this->scripts) as $file) {
+ $path = DOCROOT . $file;
+ if (file_exists($path)) {
+ $stats = stat($path);
+ $links[] = $path;
+ // 7 == size, 9 == mtime, see http://php.net/stat
+ $key = "{$key}$file $stats[7] $stats[9],";
+ } else {
+ Kohana::log("warn", "Javascript file missing: " . $file);
+ }
+ }
+
+ $key = md5($key);
+ $cache = Cache::instance();
+ $contents = $cache->get($key);
+ if (empty($contents)) {
+ $contents = "";
+ foreach ($links as $link) {
+ $contents .= file_get_contents($link);
+ }
+ $cache->set($key, $contents, array("javascript"), 30 * 84600);
+ if (function_exists("gzencode")) {
+ $cache->set("{$key}_gz", gzencode($contents, 9, FORCE_GZIP),
+ array("javascript", "gzip"), 30 * 84600);
+ }
+ }
+
+ // Handcraft the script link because html::script will add a .js extenstion
+ return "<script type=\"text/javascript\" src=\"" . url::site("javascript/combined/$key") .
+ "\"></script>";
+ }
+
/**
* Handle all theme functions that insert module content.
*/
@@ -196,7 +240,28 @@ class Theme_View_Core extends View {
case "thumb_info":
case "thumb_top":
$blocks = array();
+ if (method_exists("gallery_theme", $function)) {
+ switch (count($args)) {
+ case 0:
+ $blocks[] = gallery_theme::$function($this);
+ break;
+ case 1:
+ $blocks[] = gallery_theme::$function($this, $args[0]);
+ break;
+ case 2:
+ $blocks[] = gallery_theme::$function($this, $args[0], $args[1]);
+ break;
+ default:
+ $blocks[] = call_user_func_array(
+ array("gallery_theme", $function),
+ array_merge(array($this), $args));
+ }
+
+ }
foreach (module::active() as $module) {
+ if ($module->name == "gallery") {
+ continue;
+ }
$helper_class = "{$module->name}_theme";
if (method_exists($helper_class, $function)) {
$blocks[] = call_user_func_array(
@@ -204,6 +269,11 @@ class Theme_View_Core extends View {
array_merge(array($this), $args));
}
}
+
+ if ($function == "head" || $function == "admin_head") {
+ array_unshift($blocks, $this->_combine_script());
+ }
+
if (Session::instance()->get("debug")) {
if ($function != "head") {
array_unshift(
diff --git a/modules/gallery/libraries/drivers/Cache/Database.php b/modules/gallery/libraries/drivers/Cache/Database.php
index 70235e05..f3a1eb02 100644
--- a/modules/gallery/libraries/drivers/Cache/Database.php
+++ b/modules/gallery/libraries/drivers/Cache/Database.php
@@ -32,9 +32,8 @@ class Cache_Database_Driver implements Cache_Driver {
$this->db = Database::instance();
if (!$this->db->table_exists("caches")) {
- throw new Kohana_Exception("cache.driver_error", "Cache table is not defined");
+ throw new Exception("@todo Cache table is not defined");
}
- Kohana::log("debug", "Cache Database Driver Initialized");
}
/**
@@ -44,7 +43,7 @@ class Cache_Database_Driver implements Cache_Driver {
* @return boolean
*/
public function exists($id) {
- $count = $this->db->count_records("caches", array("id" => $id, "expiration >=" => time()));
+ $count = $this->db->count_records("caches", array("key" => $id, "expiration >=" => time()));
return $count > 0;
}
@@ -68,13 +67,12 @@ class Cache_Database_Driver implements Cache_Driver {
$lifetime += time();
}
- $data = serialize($data);
if ($this->exists($id)) {
$status = $this->db->update("caches",
- array("tags" => $tags, "expiration" => $lifetime, "cache" => $data), array("id" => $id));
+ array("tags" => $tags, "expiration" => $lifetime, "cache" => $data), array("key" => $id));
} else {
$status = $this->db->insert("caches",
- array("id" => $id, "tags" => $tags, "expiration" => $lifetime, "cache" => $data));
+ array("key" => $id, "tags" => $tags, "expiration" => $lifetime, "cache" => $data));
}
return count($status) > 0;
@@ -101,7 +99,7 @@ class Cache_Database_Driver implements Cache_Driver {
foreach ($db_result as $row) {
// Add each cache to the array
- $result[$row->id] = unserialize($row->cache);
+ $result[$row->id] = $row->cache;
}
// Turn notices back on
@@ -120,7 +118,7 @@ class Cache_Database_Driver implements Cache_Driver {
*/
public function get($id) {
$data = null;
- $result = $this->db->getwhere("caches", array("id" => $id));
+ $result = $this->db->getwhere("caches", array("key" => $id));
if (count($result) > 0) {
$cache = $result->current();
@@ -133,7 +131,7 @@ class Cache_Database_Driver implements Cache_Driver {
$ER = error_reporting(~E_NOTICE);
// Return the valid cache data
- $data = unserialize($cache->cache);
+ $data = $cache->cache;
// Turn notices back on
error_reporting($ER);
@@ -158,7 +156,7 @@ class Cache_Database_Driver implements Cache_Driver {
} else if ($tag === true) {
$this->db->like("tags", "<$id>");
} else {
- $this->db->where("id", $id);
+ $this->db->where("key", $id);
}
$status = $this->db->delete();
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index 1a44ce51..c184aba7 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -1,3 +1,3 @@
name = Gallery 3
description = Gallery core application
-version = 4
+version = 6
diff --git a/modules/organize/helpers/organize_theme.php b/modules/organize/helpers/organize_theme.php
index 27f8cdb2..cddc48b6 100644
--- a/modules/organize/helpers/organize_theme.php
+++ b/modules/organize/helpers/organize_theme.php
@@ -20,11 +20,9 @@
class organize_theme {
static function head($theme) {
// @tdo remove the addition css and organize.js (just here to test)
- $script[] = html::script("modules/organize/js/organize_init.js");
- $script[] = html::script("modules/organize/js/organize.js");
- $script[] = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
+ $theme->script("modules/organize/js/organize_init.js");
+ $theme->script("modules/organize/js/organize.js");
+ return "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("modules/organize/css/organize.css") . "\" />";
- return implode("\n", $script);
- //return html::script("modules/organize/js/organize_init.js");
}
}
diff --git a/modules/server_add/helpers/server_add_theme.php b/modules/server_add/helpers/server_add_theme.php
index 4f307a2e..3df57ee4 100644
--- a/modules/server_add/helpers/server_add_theme.php
+++ b/modules/server_add/helpers/server_add_theme.php
@@ -20,7 +20,7 @@
class server_add_theme_Core {
static function head($theme) {
if (user::active()->admin) {
- return html::script("modules/server_add/js/server_add.js");
+ $theme->script("modules/server_add/js/server_add.js");
}
}
@@ -33,8 +33,8 @@ class server_add_theme_Core {
$csrf = access::csrf_token();
$head[] = "<script> var base_url = \"$base\"; var csrf = \"$csrf\";</script>";
- $head[] = html::script("lib/jquery.autocomplete.js");
- $head[] = html::script("modules/server_add/js/admin.js");
+ $theme->script("lib/jquery.autocomplete.js");
+ $theme->script("modules/server_add/js/admin.js");
}
return implode("\n", $head);
diff --git a/modules/tag/helpers/tag_theme.php b/modules/tag/helpers/tag_theme.php
index a32d71b6..b48ad178 100644
--- a/modules/tag/helpers/tag_theme.php
+++ b/modules/tag/helpers/tag_theme.php
@@ -19,8 +19,11 @@
*/
class tag_theme_Core {
static function head($theme) {
- $url = url::file("modules/tag/js/tag.js");
- return "<script src=\"$url\" type=\"text/javascript\"></script>";
+ $theme->script("modules/tag/js/tag.js");
+ }
+
+ static function admin_head($theme) {
+ $theme->script("modules/tag/js/tag.js");
}
static function sidebar_blocks($theme) {
diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php
index 21661c48..7d201da7 100644
--- a/modules/tag/views/admin_tags.html.php
+++ b/modules/tag/views/admin_tags.html.php
@@ -1,5 +1,4 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<script src="<?= url::file("modules/tag/js/tag.js") ?>" type="text/javascript"></script>
<script>
var TAG_RENAME_URL = "<?= url::site("admin/tags/rename/__ID__") ?>";
$("document").ready(function() {
diff --git a/modules/user/helpers/user_theme.php b/modules/user/helpers/user_theme.php
index 2a4a343a..ad9d4c63 100644
--- a/modules/user/helpers/user_theme.php
+++ b/modules/user/helpers/user_theme.php
@@ -25,11 +25,8 @@ class user_theme_Core {
}
static function admin_head($theme) {
- $head = array();
if (strpos(Router::$current_uri, "admin/users") !== false) {
- $head[] = html::script("lib/gallery.panel.js");
+ $theme->script("lib/gallery.panel.js");
}
-
- return implode("\n", $head);
}
}
diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php
index b7cfaa40..dfbafe31 100644
--- a/themes/admin_default/views/admin.html.php
+++ b/themes/admin_default/views/admin.html.php
@@ -20,15 +20,7 @@
<link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
media="screen,print,projection" />
<![endif]-->
- <script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/jquery.form.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/jquery-ui.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/gallery.common.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/gallery.dialog.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/superfish/js/superfish.js") ?>" type="text/javascript"></script>
- <script src="<?= $theme->url("js/jquery.dropshadow.js") ?>" type="text/javascript"></script>
- <script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script>
- <?= $theme->admin_head() ?>
+ <?= $theme->admin_head() ?>
</head>
<body <?= $theme->body_attributes() ?>>
diff --git a/themes/default/views/movie.html.php b/themes/default/views/movie.html.php
index e8559697..134e3571 100644
--- a/themes/default/views/movie.html.php
+++ b/themes/default/views/movie.html.php
@@ -1,5 +1,4 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<script src="<?= url::file("lib/flowplayer.js") ?>" type="text/javascript"></script>
<div id="gItem">
<?= $theme->photo_top() ?>
diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php
index f6286f95..c74d4097 100644
--- a/themes/default/views/page.html.php
+++ b/themes/default/views/page.html.php
@@ -49,18 +49,6 @@
</style>
<? endif ?>
<? endif ?>
- <script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/jquery.form.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/jquery-ui.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/gallery.common.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/gallery.dialog.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/gallery.form.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/superfish/js/superfish.js") ?>" type="text/javascript"></script>
- <? if ($theme->page_type == 'photo'): ?>
- <script src="<?= url::file("lib/jquery.scrollTo.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/jquery.localscroll.js") ?>" type="text/javascript"></script>
- <? endif ?>
- <script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script>
<?= $theme->head() ?>
</head>
diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php
index 1c3b81a7..4765a4e3 100644
--- a/themes/default/views/photo.html.php
+++ b/themes/default/views/photo.html.php
@@ -2,7 +2,6 @@
<? if (access::can("view_full", $theme->item())): ?>
<!-- Use javascript to show the full size as an overlay on the current page -->
-<script src="<?= url::file("lib/gallery.show_full_size.js") ?>" type="text/javascript"></script>
<script>
$(document).ready(function() {
$(".gFullSizeLink").click(function() {