diff options
-rw-r--r-- | modules/gallery/controllers/albums.php | 4 | ||||
-rw-r--r-- | modules/gallery/helpers/movie.php | 8 | ||||
-rw-r--r-- | modules/gallery/js/l10n_client.js | 20 | ||||
-rw-r--r-- | modules/gallery/libraries/MY_View.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/admin_advanced_settings.html.php | 4 | ||||
-rw-r--r-- | themes/admin_default/views/admin.html.php | 2 | ||||
-rw-r--r-- | themes/default/views/login_page.html.php | 61 | ||||
-rw-r--r-- | themes/default/views/page.html.php | 2 |
8 files changed, 25 insertions, 78 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index f37609e6..34fee917 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -26,7 +26,9 @@ class Albums_Controller extends Items_Controller { $page_size = module::get_var("gallery", "page_size", 9); if (!access::can("view", $album)) { if ($album->id == 1) { - print new Theme_View("login_page.html"); + $view = new Theme_View("page.html", "page"); + $view->content = user::get_login_form("login/auth_html"); + print $view; return; } else { access::forbidden(); diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 3aa40dc9..986d5f62 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -142,10 +142,12 @@ class movie_Core { if (!$ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) { if (function_exists("exec")) { $ffmpeg_path = exec("which ffmpeg"); - if ($ffmpeg_path) { - module::set_var("gallery", "ffmpeg_path", $ffmpeg_path); - } } + + if (empty($ffmpeg) && @file_exists("/usr/local/bin/ffmpeg")) { + $ffmpeg_path = "/usr/local/bin/ffmpeg"; + } + module::set_var("gallery", "ffmpeg_path", $ffmpeg_path); } return $ffmpeg_path; } diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js index efd956e2..89c4a57d 100644 --- a/modules/gallery/js/l10n_client.js +++ b/modules/gallery/js/l10n_client.js @@ -35,20 +35,20 @@ jQuery.extend(Gallery, { if(userSelection.length > 0) { Gallery.l10nClient.filter(userSelection); Gallery.l10nClient.toggle(1); - $('#l10n-client #gL10nSearch').focus(); + $('#l10n-client #gL10nSearch').focus(); } else { if($('#l10n-client').is('.hidden')) { Gallery.l10nClient.toggle(1); if(!$.browser.safari) { $('#l10n-client #gL10nSearch').focus(); } - } else { + } else { Gallery.l10nClient.toggle(0); } } break; case 'clear': - this.filter(false); + this.filter(false); break; } } @@ -61,7 +61,7 @@ jQuery.extend(Gallery, { $('#l10n-client .labels .toggle').text('X'); /* * This CSS clashes with Gallery's CSS, probably due to - * YUI's grid / floats. + * YUI's grid / floats. if(!$.browser.msie) { $('body').css('border-bottom', '22em solid #fff'); } @@ -79,7 +79,7 @@ jQuery.extend(Gallery, { } */ $.cookie('Gallery_l10n_client', '0', {expires: 7, path: '/'}); - break; + break; } } // Get a string from the DOM tree @@ -124,7 +124,7 @@ jQuery.extend(Gallery, { $('#l10n-edit-translation').removeClass('hidden'); } } - // Filter the the string list by a search string + // Filter the string list by a search string this.filter = function(search) { if(search == false || search == '') { $('#l10n-client #l10n-search-filter-clear').focus(); @@ -153,7 +153,7 @@ Gallery.behaviors.l10nClient = function(context) { Gallery.l10nClient.toggle(0); break; } - + // If the selection changes, copy string values to the source and target fields. // Add class to indicate selected string in list widget. $('#l10n-client-string-select li').click(function() { @@ -173,7 +173,7 @@ Gallery.behaviors.l10nClient = function(context) { $('#l10n-client .labels .toggle').click(function() { if($('#l10n-client').is('.hidden')) { Gallery.l10nClient.toggle(1); - } else { + } else { Gallery.l10nClient.toggle(0); } }); @@ -184,7 +184,7 @@ Gallery.behaviors.l10nClient = function(context) { $.hotkeys.add(Gallery.l10nClient.keys['toggle'], function(){Gallery.l10nClient.key('toggle')}); $.hotkeys.add(Gallery.l10nClient.keys['clear'], {target:'#l10n-client #gL10nSearch', type:'keyup'}, function(){Gallery.l10nClient.key('clear')}); } - + // Custom listener for l10n_client livesearch $('#l10n-client #gL10nSearch').keyup(function(key) { Gallery.l10nClient.filter($('#l10n-client #gL10nSearch').val()); @@ -222,7 +222,7 @@ Gallery.behaviors.l10nClient = function(context) { // Clear the translation form fields Gallery.l10nClient.showSourceMessage('', false); $('#gL10nClientSaveForm #l10n-edit-translation').val(''); - + for (var i = 0; i < num_plural_forms; i++) { var form = plural_forms[i]; $('#gL10nClientSaveForm #l10n-edit-plural-translation-' + form).val(''); diff --git a/modules/gallery/libraries/MY_View.php b/modules/gallery/libraries/MY_View.php index bd2794a0..96dcc71b 100644 --- a/modules/gallery/libraries/MY_View.php +++ b/modules/gallery/libraries/MY_View.php @@ -44,7 +44,7 @@ class View extends View_Core { } } - public function main_element_attributes() { + public function body_attributes() { if (locale::is_rtl()) { return 'class="rtl"'; } diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index 77aff050..34abadea 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -25,7 +25,11 @@ <a href="<?= url::site("admin/advanced_settings/edit/$var->module_name/" . p::clean($var->name)) ?>" class="gDialogLink" title="<?= t("Edit %var (%module_name)", array("var" => p::clean($var->name), "module_name" => $var->module_name)) ?>"> + <? if ($var->value): ?> <?= p::clean($var->value) ?> + <? else: ?> + <i> <?= t("empty") ?> </i> + <? endif ?> </a> </td> </tr> diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index 721c4dd5..b7cfaa40 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -31,7 +31,7 @@ <?= $theme->admin_head() ?> </head> - <body <?= $theme->main_element_attributes() ?>> + <body <?= $theme->body_attributes() ?>> <?= $theme->admin_page_top() ?> <? if ($sidebar): ?> <div id="doc3" class="yui-t5 gView"> diff --git a/themes/default/views/login_page.html.php b/themes/default/views/login_page.html.php deleted file mode 100644 index c4880727..00000000 --- a/themes/default/views/login_page.html.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tranisitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title> - <?= t("Please Login to Gallery") ?> - </title> - <link rel="shortcut icon" href="<?= $theme->url("images/favicon.ico") ?>" type="image/x-icon" /> - <link rel="stylesheet" type="text/css" href="<?= url::file("lib/yui/reset-fonts-grids.css") ?>" - media="screen,print,projection" /> - <link rel="stylesheet" type="text/css" href="<?= url::file("lib/superfish/css/superfish.css") ?>" - media="screen" /> - <link rel="stylesheet" type="text/css" href="<?= url::file("lib/themeroller/ui.base.css") ?>" - media="screen,print,projection" /> - <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/screen.css") ?>" - media="screen,print,projection" /> - <!--[if lt IE 8]> - <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/gallery.form.js") ?>" type="text/javascript"></script> - <script src="<?= url::file("lib/superfish/js/superfish.js") ?>" type="text/javascript"></script> - <script src="<?= $theme->url("js/jquery.scrollTo.js") ?>" type="text/javascript"></script> - <script src="<?= $theme->url("js/jquery.localscroll.js") ?>" type="text/javascript"></script> - <script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script> - <?= $theme->head() ?> - </head> - - <body <?= $theme->main_element_attributes() ?>> - <?= $theme->page_top() ?> - <div id="doc4" class="yui-t5 gView"> - <?= $theme->site_status() ?> - <div id="gHeader"> - <?= $theme->display("header.html") ?> - </div> - <div id="bd"> - <div id="yui-main"> - <div class="yui-b"> - <div id="gContent" class="yui-g"> - <?= $theme->messages() ?> - <?= user::get_login_form("login/auth_html") ?> - </div> - </div> - </div> - <div id="gSidebar" class="yui-b"> - </div> - </div> - <div id="gFooter"> - <?= $theme->display("footer.html") ?> - </div> - </div> - <?= $theme->page_bottom() ?> - </body> -</html> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 6c77fb72..0c84129f 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -54,7 +54,7 @@ <?= $theme->head() ?> </head> - <body <?= $theme->main_element_attributes() ?>> + <body <?= $theme->body_attributes() ?>> <?= $theme->page_top() ?> <div id="doc4" class="yui-t5 gView"> <?= $theme->site_status() ?> |