summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-11-03 17:30:18 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-11-03 17:30:18 -0800
commit1faa2492952a54f0b80cce149ae42b59b91039df (patch)
treee25c2d0e9ceccf1974449eeda3ef62f4cb5e87c0 /modules
parent6dd622416531e8897af2bc3712e55a640277ac62 (diff)
parent9a33f96e31ba41d78ab24eb9420d74578c7fbbcf (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules')
-rw-r--r--modules/g2_import/helpers/g2_import.php6
-rw-r--r--modules/gallery/helpers/gallery_event.php2
-rw-r--r--modules/gallery/helpers/theme.php11
-rw-r--r--modules/gallery/views/admin_languages.html.php6
-rw-r--r--modules/recaptcha/helpers/recaptcha_event.php6
-rw-r--r--modules/recaptcha/views/form_recaptcha.html.php2
6 files changed, 21 insertions, 12 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 248f8017..202a0e92 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -217,7 +217,7 @@ class g2_import_Core {
static function import_group(&$queue) {
$g2_group_id = array_shift($queue);
if (self::map($g2_group_id)) {
- return t("Group with id: %id already imported, skipping", array("id" => $g2_group_id));
+ return;
}
try {
@@ -330,7 +330,7 @@ class g2_import_Core {
}
if (self::map($g2_album_id)) {
- return t("Album with id: %id already imported, skipping", array("id" => $g2_album_id));
+ return;
}
try {
@@ -424,7 +424,7 @@ class g2_import_Core {
$g2_item_id = array_shift($queue);
if (self::map($g2_item_id)) {
- return t("Item with id: %id already imported, skipping", array("id" => $g2_item_id));
+ return;
}
try {
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index 67a6f41f..e3cb6a9b 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -23,8 +23,8 @@ class gallery_event_Core {
* Initialization.
*/
static function gallery_ready() {
- theme::load_themes();
identity::load_user();
+ theme::load_themes();
locales::set_request_locale();
}
diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php
index 64e919e3..da57a37e 100644
--- a/modules/gallery/helpers/theme.php
+++ b/modules/gallery/helpers/theme.php
@@ -30,13 +30,16 @@ class theme_Core {
*/
static function load_themes() {
$path = Input::instance()->server("PATH_INFO");
+ $input = Input::instance();
if (empty($path)) {
- $path = "/" . Input::instance()->get("kohana_uri");
+ $path = "/" . $input->get("kohana_uri");
}
- $theme_name = module::get_var(
- "gallery",
- !strncmp($path, "/admin", 6) ? "active_admin_theme" : "active_site_theme");
+ if (!(identity::active_user()->admin && $theme_name = $input->get("theme"))) {
+ $theme_name = module::get_var(
+ "gallery",
+ !strncmp($path, "/admin", 6) ? "active_admin_theme" : "active_site_theme");
+ }
$modules = Kohana::config("core.modules");
array_unshift($modules, THEMEPATH . $theme_name);
Kohana::config_set("core.modules", $modules);
diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php
index 94626b98..07134475 100644
--- a/modules/gallery/views/admin_languages.html.php
+++ b/modules/gallery/views/admin_languages.html.php
@@ -57,7 +57,7 @@
<th> <?= t("Default language") ?> </th>
</tr>
<? endif ?>
- <tr class="<?= (isset($installed_locales[$code])) ? "g-installed" : "" ?><?= ($default_locale == $code) ? " g-default" : "" ?>">
+ <tr class="<?= (isset($installed_locales[$code])) ? "g-available" : "" ?><?= ($default_locale == $code) ? " g-selected" : "" ?>">
<td> <?= form::checkbox("installed_locales[]", $code, isset($installed_locales[$code])) ?> </td>
<td> <?= $display_name ?> </td>
<td>
@@ -89,12 +89,12 @@
<p><?= t("Follow these steps to begin translating Gallery.") ?></p>
- <ul>
+ <ol>
<li><?= t("Make sure the target language is installed and up to date (check above).") ?></li>
<li><?= t("Make sure you have selected the right target language (currently %default_locale).",
array("default_locale" => locales::display_name())) ?></li>
<li><?= t("Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?></li>
- </ul>
+ </ol>
<a href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>"
class="g-button ui-state-default ui-corner-all ui-icon-left">
<span class="ui-icon ui-icon-power"></span>
diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php
index 7a0b4f58..04af9568 100644
--- a/modules/recaptcha/helpers/recaptcha_event.php
+++ b/modules/recaptcha/helpers/recaptcha_event.php
@@ -28,6 +28,12 @@ class recaptcha_event_Core {
}
}
+ static function register_add_form($form) {
+ if (module::get_var("recaptcha", "public_key")) {
+ $form->register_user->recaptcha("recaptcha")->label("")->id("g-recaptcha");
+ }
+ }
+
static function admin_menu($menu, $theme) {
$menu->get("settings_menu")
->append(Menu::factory("link")
diff --git a/modules/recaptcha/views/form_recaptcha.html.php b/modules/recaptcha/views/form_recaptcha.html.php
index f26ebdf6..20e7359e 100644
--- a/modules/recaptcha/views/form_recaptcha.html.php
+++ b/modules/recaptcha/views/form_recaptcha.html.php
@@ -12,6 +12,6 @@
callback: Recaptcha.focus_response_field
}
);
- }, 0);
+ }, 500);
</script>