Skip to content

Commit

Permalink
Merge branch 'master' into talmdal_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Almdal committed Dec 28, 2009
2 parents 8ce4d03 + 38f2784 commit 5925e58
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/gallery/libraries/MY_Database.php
Expand Up @@ -39,7 +39,7 @@ protected function __construct(array $config) {
* table prefix . $1
*/
public function query($sql = '') {
if ($this->config["table_prefix"] && !empty($sql)) {
if (!empty($sql)) {
$sql = $this->add_table_prefixes($sql);
}
return parent::query($sql);
Expand Down
2 changes: 1 addition & 1 deletion modules/gallery/views/admin_advanced_settings.html.php
Expand Up @@ -25,7 +25,7 @@
<a href="<?= url::site("admin/advanced_settings/edit/$var->module_name/" . html::clean($var->name)) ?>"
class="g-dialog-link"
title="<?= t("Edit %var (%module_name)", array("var" => $var->name, "module_name" => $var->module_name))->for_html_attr() ?>">
<? if ($var->value): ?>
<? if (isset($var->value)): ?>
<?= html::clean($var->value) ?>
<? else: ?>
<i> <?= t("empty") ?> </i>
Expand Down
9 changes: 6 additions & 3 deletions modules/slideshow/helpers/slideshow_event.php
Expand Up @@ -31,31 +31,34 @@ static function module_change($changes) {
}

static function album_menu($menu, $theme) {
$max_scale = module::get_var("slideshow", "max_scale");
if ($theme->item()->descendants_count(array(array("type", "=", "photo")))) {
$menu->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:cooliris.embed.show(" .
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
"{maxScale:$max_scale,feed:'" . self::_feed_url($theme) . "'})")
->css_id("g-slideshow-link"));
}
}

static function photo_menu($menu, $theme) {
$max_scale = module::get_var("slideshow", "max_scale");
$menu->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:cooliris.embed.show(" .
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
"{maxScale:$max_scale,feed:'" . self::_feed_url($theme) . "'})")
->css_id("g-slideshow-link"));
}

static function tag_menu($menu, $theme) {
$max_scale = module::get_var("slideshow", "max_scale");
$menu->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:cooliris.embed.show(" .
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
"{maxScale:$max_scale,feed:'" . self::_feed_url($theme) . "'})")
->css_id("g-slideshow-link"));
}

Expand Down
12 changes: 12 additions & 0 deletions modules/slideshow/helpers/slideshow_installer.php
Expand Up @@ -18,6 +18,18 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class slideshow_installer {
static function install() {
module::set_var("slideshow", "max_scale", 0);
module::set_version("slideshow", 2);
}

static function upgrade($version) {
if ($version == 1) {
module::set_var("slideshow", "max_scale", 0);
module::set_version("slideshow", $version = 2);
}
}

static function deactivate() {
site_status::clear("slideshow_needs_rss");
}
Expand Down
2 changes: 1 addition & 1 deletion modules/slideshow/module.info
@@ -1,3 +1,3 @@
name = "Slideshow"
description = "Allows users to view a slideshow of photos"
version = 1
version = 2

0 comments on commit 5925e58

Please sign in to comment.