From e2863cf1c568b2e88d6c08fa67800a13cd4bd067 Mon Sep 17 00:00:00 2001
From: Tim Almdal
Date: Wed, 17 Jun 2009 21:14:36 +0800
Subject: Fix for ticket #366 1) Stored the menu element type in the menu
element 2) Scanned the menu before display removing any empty sub menus. Went
with the removal approach because there will more users than developers
Signed-off-by:
---
modules/gallery/libraries/Menu.php | 19 ++++++++++++-------
modules/gallery/libraries/Theme_View.php | 14 ++++++++++++++
2 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php
index 83bd1616..79274057 100644
--- a/modules/gallery/libraries/Menu.php
+++ b/modules/gallery/libraries/Menu.php
@@ -23,6 +23,11 @@ class Menu_Element {
public $css_id;
public $css_class;
public $id;
+ public $type;
+
+ public function __construct($type) {
+ $this->type = $type;
+ }
/**
* Set the id
@@ -125,26 +130,26 @@ class Menu_Core extends Menu_Element {
public static function factory($type) {
switch($type) {
case "link":
- return new Menu_Element_Link();
+ return new Menu_Element_Link($type);
case "dialog":
- return new Menu_Element_Dialog();
+ return new Menu_Element_Dialog($type);
case "root":
- $menu = new Menu();
- $menu->is_root = true;
- return $menu;
+ return new Menu("root");
case "submenu":
- return new Menu();
+ return new Menu("submenu");
default:
throw Exception("@todo UNKNOWN_MENU_TYPE");
}
}
- public function __construct() {
+ public function __construct($type) {
+ parent::__construct($type);
$this->elements = array();
+ $this->is_root = $type == "root";
}
/**
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 31c2faa7..904a3c07 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -103,11 +103,25 @@ class Theme_View_Core extends View {
call_user_func_array(array($class, "site"), array(&$menu, $this));
}
}
+
+ $this->_remove_empty_items($menu);
}
print $menu;
}
+ private function _remove_empty_items($menu) {
+ foreach ($menu->elements as $target_id => $element) {
+ if ($element->type == "submenu") {
+ if (empty($element->elements)) {
+ $menu->remove($target_id);
+ } else {
+ $this->_remove_empty_items($element);
+ }
+ }
+ }
+ }
+
public function album_menu() {
$this->_menu("album");
}
--
cgit v1.2.3
From 9af8027cf30e346b8cf42ade14efee39a8221b0d Mon Sep 17 00:00:00 2001
From: Tim Almdal
Date: Wed, 17 Jun 2009 21:42:31 +0800
Subject: Fix for ticket #366 Move the creation of the setting menu back to
gallery_menu::admin, now that there is a mechanism to remove empty menu items
Signed-off-by:
---
modules/akismet/helpers/akismet_menu.php | 6 ------
modules/gallery/helpers/gallery_menu.php | 3 +++
modules/gallery/libraries/Admin_View.php | 14 ++++++++++++++
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/modules/akismet/helpers/akismet_menu.php b/modules/akismet/helpers/akismet_menu.php
index 2862fd40..ebd948d6 100644
--- a/modules/akismet/helpers/akismet_menu.php
+++ b/modules/akismet/helpers/akismet_menu.php
@@ -26,12 +26,6 @@ class akismet_menu_Core {
->url(url::site("admin/akismet")));
if (module::get_var("akismet", "api_key")) {
- if (!$statistics_menu = $menu->get("statistics_menu")) {
- $menu->append(Menu::factory("submenu")
- ->id("statistics_menu")
- ->label(t("Statistics")));
- }
-
$menu->get("statistics_menu")
->append(Menu::factory("link")
->id("akismet")
diff --git a/modules/gallery/helpers/gallery_menu.php b/modules/gallery/helpers/gallery_menu.php
index fb0234b1..a25832fe 100644
--- a/modules/gallery/helpers/gallery_menu.php
+++ b/modules/gallery/helpers/gallery_menu.php
@@ -149,6 +149,9 @@ class gallery_menu_Core {
->id("theme_options")
->label(t("Theme Options"))
->url(url::site("admin/theme_options"))))
+ ->append(Menu::factory("submenu")
+ ->id("statistics_menu")
+ ->label(t("Statistics")))
->append(Menu::factory("link")
->id("maintenance")
->label(t("Maintenance"))
diff --git a/modules/gallery/libraries/Admin_View.php b/modules/gallery/libraries/Admin_View.php
index 1f976871..11a96d75 100644
--- a/modules/gallery/libraries/Admin_View.php
+++ b/modules/gallery/libraries/Admin_View.php
@@ -69,9 +69,23 @@ class Admin_View_Core extends View {
}
}
+ $this->_remove_empty_items($menu);
print $menu;
}
+ private function _remove_empty_items($menu) {
+ foreach ($menu->elements as $target_id => $element) {
+ if ($element->type == "submenu") {
+ if (empty($element->elements)) {
+ $menu->remove($target_id);
+ } else {
+ $this->_remove_empty_items($element);
+ }
+ }
+ }
+ }
+
+
/**
* Print out any site wide status information.
*/
--
cgit v1.2.3
From a179d6bdf87dc654d7afc903b48def3562a73af0 Mon Sep 17 00:00:00 2001
From: Tim Almdal
Date: Thu, 18 Jun 2009 04:34:18 +0800
Subject: Correct the "inappropriate intimacy" smell that bharat's refined
senses pick up
Signed-off-by:
---
modules/gallery/libraries/Admin_View.php | 15 +--------------
modules/gallery/libraries/Menu.php | 12 ++++++++++++
modules/gallery/libraries/Theme_View.php | 15 +--------------
3 files changed, 14 insertions(+), 28 deletions(-)
diff --git a/modules/gallery/libraries/Admin_View.php b/modules/gallery/libraries/Admin_View.php
index 11a96d75..7a7396eb 100644
--- a/modules/gallery/libraries/Admin_View.php
+++ b/modules/gallery/libraries/Admin_View.php
@@ -69,23 +69,10 @@ class Admin_View_Core extends View {
}
}
- $this->_remove_empty_items($menu);
+ $menu->compact();
print $menu;
}
- private function _remove_empty_items($menu) {
- foreach ($menu->elements as $target_id => $element) {
- if ($element->type == "submenu") {
- if (empty($element->elements)) {
- $menu->remove($target_id);
- } else {
- $this->_remove_empty_items($element);
- }
- }
- }
- }
-
-
/**
* Print out any site wide status information.
*/
diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php
index 79274057..6d0881ce 100644
--- a/modules/gallery/libraries/Menu.php
+++ b/modules/gallery/libraries/Menu.php
@@ -146,6 +146,18 @@ class Menu_Core extends Menu_Element {
}
}
+ public function compact() {
+ foreach ($this->elements as $target_id => $element) {
+ if ($element->type == "submenu") {
+ if (empty($element->elements)) {
+ $this->remove($target_id);
+ } else {
+ $element->compact();
+ }
+ }
+ }
+ }
+
public function __construct($type) {
parent::__construct($type);
$this->elements = array();
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 904a3c07..7b2ca840 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -103,25 +103,12 @@ class Theme_View_Core extends View {
call_user_func_array(array($class, "site"), array(&$menu, $this));
}
}
-
- $this->_remove_empty_items($menu);
}
+ $menu->compact();
print $menu;
}
- private function _remove_empty_items($menu) {
- foreach ($menu->elements as $target_id => $element) {
- if ($element->type == "submenu") {
- if (empty($element->elements)) {
- $menu->remove($target_id);
- } else {
- $this->_remove_empty_items($element);
- }
- }
- }
- }
-
public function album_menu() {
$this->_menu("album");
}
--
cgit v1.2.3
From 4ec997ee74ab9ad505250a4fd677954cf4cd3142 Mon Sep 17 00:00:00 2001
From: Andy Staudacher
Date: Thu, 18 Jun 2009 16:42:59 +0800
Subject: Fix/remove unnecessary escaping of double quotes in l10n scanner.
Signed-off-by:
---
modules/gallery/helpers/l10n_scanner.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/gallery/helpers/l10n_scanner.php b/modules/gallery/helpers/l10n_scanner.php
index 80b6f01c..bae455f2 100644
--- a/modules/gallery/helpers/l10n_scanner.php
+++ b/modules/gallery/helpers/l10n_scanner.php
@@ -149,6 +149,6 @@ class l10n_scanner_Core {
} else {
$str = strtr($str, array("\\'" => "'", "\\\\" => "\\"));
}
- return addcslashes($str, "\0..\37\\\"");
+ return $str;
}
}
--
cgit v1.2.3
From f75f7af88eccd7e059947f6cbd9af325dad8c6f8 Mon Sep 17 00:00:00 2001
From: Andy Staudacher
Date: Thu, 18 Jun 2009 16:47:29 +0800
Subject: Fix l10n messages (malformed html)
Signed-off-by:
---
modules/comment/views/comments.html.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index 95f07baf..854f9554 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -16,7 +16,7 @@
width="40"
height="40" />
- = t("on %date %name said",
+ = t('on %date %name said',
array("date" => date("Y-M-d H:i:s", $comment->created),
"name" => p::clean($comment->author_name()))); ?>
--
cgit v1.2.3
From 39b12cb4320a3f9fd7589aa701cbea4996d974a2 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Fri, 19 Jun 2009 03:24:33 +0800
Subject: Make an attempt to catch all situations where loading an item from G2
returns an error, and log them appropriately. This should fix a slew of
import failures from corrupt G2 installs.
Signed-off-by:
---
modules/g2_import/helpers/g2_import.php | 74 +++++++++++++++++++++++++--------
1 file changed, 56 insertions(+), 18 deletions(-)
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 0491722d..c929dbec 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
class g2_import_Core {
public static $init = false;
public static $map = array();
@@ -207,7 +208,14 @@ class g2_import_Core {
return;
}
- $g2_group = g2(GalleryCoreApi::loadEntitiesById($g2_group_id));
+ try {
+ $g2_group = g2(GalleryCoreApi::loadEntitiesById($g2_group_id));
+ } catch (Exception $e) {
+ g2_import::log(
+ t("Failed to import Gallery 2 group with id: %id", array("id" => $g2_group_id)));
+ return;
+ }
+
switch ($g2_group->getGroupType()) {
case GROUP_NORMAL:
try {
@@ -255,9 +263,8 @@ class g2_import_Core {
try {
$g2_user = g2(GalleryCoreApi::loadEntitiesById($g2_user_id));
} catch (Exception $e) {
- $msg = t("Failed to import Gallery 2 user with id: %id", array("id" => $g2_user_id));
- Kohana::log("alert", $msg);
- message::warning($msg);
+ g2_import::log(
+ t("Failed to import Gallery 2 user with id: %id", array("id" => $g2_user_id)));
return;
}
$g2_groups = g2(GalleryCoreApi::fetchGroupsForUser($g2_user->getId()));
@@ -305,8 +312,15 @@ class g2_import_Core {
return;
}
- // Load the G2 album item, and figure out its parent in G3.
- $g2_album = g2(GalleryCoreApi::loadEntitiesById($g2_album_id));
+ try {
+ // Load the G2 album item, and figure out its parent in G3.
+ $g2_album = g2(GalleryCoreApi::loadEntitiesById($g2_album_id));
+ } catch (Exception $e) {
+ g2_import::log(
+ t("Failed to import Gallery 2 album with id: %id", array("id" => $g2_album_id)));
+ return;
+ }
+
if ($g2_album->getParentId() == null) {
return;
}
@@ -392,10 +406,17 @@ class g2_import_Core {
return;
}
- self::$current_g2_item = $g2_item = g2(GalleryCoreApi::loadEntitiesById($g2_item_id));
+ try {
+ self::$current_g2_item = $g2_item = g2(GalleryCoreApi::loadEntitiesById($g2_item_id));
+ $g2_path = g2($g2_item->fetchPath());
+ } catch (Exception $e) {
+ g2_import::log(
+ t("Failed to import Gallery 2 item with id: %id", array("id" => $g2_item_id)));
+ return;
+ }
+
$parent = ORM::factory("item", self::map($g2_item->getParentId()));
- $g2_path = g2($g2_item->fetchPath());
$g2_type = $g2_item->getEntityType();
$corrupt = 0;
if (!file_exists($g2_path)) {
@@ -406,8 +427,8 @@ class g2_import_Core {
//
// Note that this will change movies to be photos, if there's a broken movie. Hopefully
// this case is rare enough that we don't need to take any heroic action here.
-
- Kohana::log("alert", "$g2_path missing in import; replacing it");
+ g2_import::log(
+ t("%path missing in import; replacing it with a placeholder", array("path" => $g2_path)));
$g2_path = MODPATH . "g2_import/data/broken-image.gif";
$g2_type = "GalleryPhotoItem";
$corrupt = 1;
@@ -417,7 +438,7 @@ class g2_import_Core {
case "GalleryPhotoItem":
if (!in_array($g2_item->getMimeType(), array("image/jpeg", "image/gif", "image/png"))) {
$g2_path = MODPATH . "g2_import/data/broken-image.gif";
- Kohana::log("alert", "$g2_path unsupported image type; using a placeholder gif");
+ Kohana::log("alert", "$g2_path is an unsupported image type; using a placeholder gif");
$corrupt = 1;
}
try {
@@ -429,8 +450,8 @@ class g2_import_Core {
self::extract_description($g2_item),
self::map($g2_item->getOwnerId()));
} catch (Exception $e) {
- Kohana::log("alert", "Corrupt image $g2_path\n" .
- $e->getMessage() . "\n" . $e->getTraceAsString());
+ Kohana::log(
+ "alert", "Corrupt image $g2_path\n" . $e->getMessage() . "\n" . $e->getTraceAsString());
$corrupt = 1;
}
break;
@@ -486,9 +507,7 @@ class g2_import_Core {
t("%title from Gallery 2 could not be processed",
array("g2_url" => $g2_item_url, "title" => $g2_item->getTitle()));
}
- message::warning($warning);
- log::warning("g2_import", $warning);
- Kohana::log("alert", $warning);
+ g2_import::log($warning);
}
self::$current_g2_item = null;
@@ -499,7 +518,14 @@ class g2_import_Core {
*/
static function import_comment(&$queue) {
$g2_comment_id = array_shift($queue);
- $g2_comment = g2(GalleryCoreApi::loadEntitiesById($g2_comment_id));
+
+ try {
+ $g2_comment = g2(GalleryCoreApi::loadEntitiesById($g2_comment_id));
+ } catch (Exception $e) {
+ g2_import::log("Failed to import Gallery 2 comment with id: %id",
+ array("id" => $g2_comment_id));
+ return;
+ }
$text = $g2_comment->getSubject();
if ($text) {
@@ -528,7 +554,14 @@ class g2_import_Core {
GalleryCoreApi::requireOnce("modules/tags/classes/TagsHelper.class");
$g2_item_id = array_shift($queue);
$g3_item = ORM::factory("item", self::map($g2_item_id));
- $tag_names = array_values(g2(TagsHelper::getTagsByItemId($g2_item_id)));
+
+ try {
+ $tag_names = array_values(g2(TagsHelper::getTagsByItemId($g2_item_id)));
+ } catch (Exception $e) {
+ g2_import::log("Failed to import tags for Gallery 2 item with id: %id",
+ array("id" => $g2_item_id));
+ return;
+ }
foreach ($tag_names as $tag_name) {
$tag = tag::add($g3_item, $tag_name);
@@ -767,6 +800,11 @@ class g2_import_Core {
$g2_map->save();
self::$map[$g2_id] = $g3_id;
}
+
+ static function log($msg) {
+ message::warning($msg);
+ Kohana::log("alert", $msg);
+ }
}
/**
--
cgit v1.2.3
From 1d9f9138fb1ab67866f611a92527304a937b9ad8 Mon Sep 17 00:00:00 2001
From: Andy Staudacher
Date: Fri, 19 Jun 2009 03:35:07 +0800
Subject: Fix plural messages in l10n scanner - Bad typo lead to basically
breaking all plural ("other") forms.
Signed-off-by:
---
modules/gallery/helpers/l10n_scanner.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/gallery/helpers/l10n_scanner.php b/modules/gallery/helpers/l10n_scanner.php
index bae455f2..a68aa28b 100644
--- a/modules/gallery/helpers/l10n_scanner.php
+++ b/modules/gallery/helpers/l10n_scanner.php
@@ -125,7 +125,7 @@ class l10n_scanner_Core {
&& is_array($first_param) && $first_param[0] == T_CONSTANT_ENCAPSED_STRING
&& is_array($second_param) && $second_param[0] == T_CONSTANT_ENCAPSED_STRING) {
$singular = self::_escape_quoted_string($first_param[1]);
- $plural = self::_escape_quoted_string($first_param[1]);
+ $plural = self::_escape_quoted_string($second_param[1]);
l10n_scanner::process_message(array("one" => $singular, "other" => $plural), $cache);
} else {
// t2() found, but inside is something which is not a string literal.
--
cgit v1.2.3
From 2d54edc50e281016fca9f4b2710dd9f305051393 Mon Sep 17 00:00:00 2001
From: Andy Staudacher
Date: Fri, 19 Jun 2009 03:44:05 +0800
Subject: Fix format of source message in l10n client (adding a newline between
plural forms)
Signed-off-by:
---
modules/gallery/js/l10n_client.js | 9 +++++----
modules/gallery/views/l10n_client.html.php | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js
index 89c4a57d..4936d1cc 100644
--- a/modules/gallery/js/l10n_client.js
+++ b/modules/gallery/js/l10n_client.js
@@ -93,12 +93,13 @@ jQuery.extend(Gallery, {
// Display the source message
this.showSourceMessage = function(source, is_plural) {
if (is_plural) {
- var pretty_source = '[one] - ' + source['one'] + "\n";
- pretty_source += '[other] - ' + source['other'];
+ var pretty_source = $('#source-text-tmp-space').text('[one] - ' + source['one']).html();
+ pretty_source += ' ';
+ pretty_source += $('#source-text-tmp-space').text('[other] - ' + source['other']).html();
} else {
- var pretty_source = source;
+ var pretty_source = $('#source-text-tmp-space').text(source).html();
}
- $('#l10n-client-string-editor .source-text').text(pretty_source);
+ $('#l10n-client-string-editor .source-text').html(pretty_source);
}
this.isPluralMessage = function(message) {
return typeof(message) == 'object';
diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php
index 01537e25..c15f4b0e 100644
--- a/modules/gallery/views/l10n_client.html.php
+++ b/modules/gallery/views/l10n_client.html.php
@@ -30,6 +30,7 @@
+
+
= $theme->photo_bottom() ?>
--
cgit v1.2.3
From 4e1e429fbfa49c60fb4a24c05af1debcd433c0d4 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 20 Jun 2009 01:30:59 +0800
Subject: Swap the order of two lines to make the debug output have the right
data.
Signed-off-by:
---
modules/g2_import/helpers/g2_import.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index c929dbec..00e3d31a 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -437,8 +437,8 @@ class g2_import_Core {
switch ($g2_type) {
case "GalleryPhotoItem":
if (!in_array($g2_item->getMimeType(), array("image/jpeg", "image/gif", "image/png"))) {
- $g2_path = MODPATH . "g2_import/data/broken-image.gif";
Kohana::log("alert", "$g2_path is an unsupported image type; using a placeholder gif");
+ $g2_path = MODPATH . "g2_import/data/broken-image.gif";
$corrupt = 1;
}
try {
--
cgit v1.2.3
From acadb3623b4e6c6ab5c8407c67fa12a8beb7db33 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 20 Jun 2009 03:03:35 +0800
Subject: Catch exceptions from tag::add() that can be caused by character
encoding issues resulting from embedded keywords in encodings we can't
decipher. This can lead to weird truncation issues which in turn can lead to
multiple tags getting truncated to the same value in MySQL which leads to
mysql complaining that we're adding a duplicate tag.
Signed-off-by:
---
modules/tag/helpers/tag_event.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index 735422b5..946326c0 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -45,7 +45,12 @@ class tag_event_Core {
// @todo figure out how to read the keywords from xmp
foreach(array_keys($tags) as $tag) {
- tag::add($photo, $tag);
+ try {
+ tag::add($photo, $tag);
+ } catch (Exception $e) {
+ Kohana::log("error", "Error adding tag: $tag\n" .
+ $e->getMessage() . "\n" . $e->getTraceAsString());
+ }
}
return;
--
cgit v1.2.3
From fb888c7598f163e839f204e7d03523c1e0012022 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 20 Jun 2009 04:25:42 +0800
Subject: Improve the task dialog 1) Put a "starting up..." message before
there's any feedback from the server 2) show the title of the task in the
dialog.
Signed-off-by:
---
modules/gallery/views/admin_maintenance_task.html.php | 5 ++++-
themes/default/css/screen.css | 4 ++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/gallery/views/admin_maintenance_task.html.php b/modules/gallery/views/admin_maintenance_task.html.php
index 1ee02311..d9aecc60 100644
--- a/modules/gallery/views/admin_maintenance_task.html.php
+++ b/modules/gallery/views/admin_maintenance_task.html.php
@@ -23,8 +23,11 @@
}
+
= $task->name ?>
-
+
+ = t("Starting up...") ?>
+
diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css
index 03c13cc1..68f12ff1 100644
--- a/themes/default/css/screen.css
+++ b/themes/default/css/screen.css
@@ -1000,6 +1000,10 @@ form .gError,
/*************** STUFF THAT NEEDS A HOME ****************/
+#gProgress h1 {
+ font-size: 1.1em;
+}
+
.gProgressBar {
height: 1em;
width: 100%;
--
cgit v1.2.3
From 4e676c8d0bd640e8cbdc5d32576b8a2bf6b943eb Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 20 Jun 2009 04:35:53 +0800
Subject: Move 'Permissions' above 'STUFF THAT NEEDS A HOME' since I think that
the stuff that needs a home is a catch all and should be at the bottom.
Signed-off-by:
---
themes/default/css/screen.css | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css
index 68f12ff1..e97c95d5 100644
--- a/themes/default/css/screen.css
+++ b/themes/default/css/screen.css
@@ -999,6 +999,19 @@ form .gError,
}
+/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gPermissions .gDenied, #gPermissions .gAllowed {
+ text-align: center;
+ vertical-align: middle;
+}
+#gPermissions .gDenied {
+ background-color: #fcc;
+}
+#gPermissions .gAllowed {
+ background-color: #cfc;
+}
+
/*************** STUFF THAT NEEDS A HOME ****************/
#gProgress h1 {
font-size: 1.1em;
@@ -1058,16 +1071,3 @@ form .gError,
background-color: #cfc;
border: 1px solid #beb;
}
-
-/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-
-#gPermissions .gDenied, #gPermissions .gAllowed {
- text-align: center;
- vertical-align: middle;
-}
-#gPermissions .gDenied {
- background-color: #fcc;
-}
-#gPermissions .gAllowed {
- background-color: #cfc;
-}
--
cgit v1.2.3
From caa5c39ae25a4914c29082a4d7fcc714f2424888 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 20 Jun 2009 04:47:38 +0800
Subject: Give the admin/g2_import page a facelift.
Signed-off-by:
---
modules/g2_import/views/admin_g2_import.html.php | 114 +++++++++++++----------
themes/default/css/screen.css | 29 ++++++
2 files changed, 95 insertions(+), 48 deletions(-)
diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php
index d5e29e12..0c742962 100644
--- a/modules/g2_import/views/admin_g2_import.html.php
+++ b/modules/g2_import/views/admin_g2_import.html.php
@@ -1,74 +1,92 @@
-
+
= t("Gallery 2 Import") ?>
= t("Import your Gallery 2 users, photos, movies, comments and tags into your new Gallery 3 installation.") ?>
-
- = t("Note: The importer is a work in progress and does not currently support permissions, and movie formats other than Flash video and MP4") ?>
-
- = t("Note: The importer has known issues with the eAccelerator PHP accelerator. If you're using eAccelerator, please disable it. One way to do that is to put php_value eaccelerator.enable 0 in gallery3/.htaccess") ?>
- = t("Your Gallery 2 has the following importable data in it") ?>
+ = t("The import process is a work in progress with some known issues:") ?>
- = t2("1 user", "%count users", $g2_stats["users"]) ?>
+ = t("Permissions are not imported. You will have to set them again manually (for now).") ?>
- = t2("1 group", "%count groups", $g2_stats["groups"]) ?>
+ = t("The only supported image formats are JPG, PNG and GIF. Other formats will be skipped.") ?>
- = t2("1 album", "%count albums", $g2_stats["albums"]) ?>
+ = t("The only supported movie formats are FLV and MP4. Other formats will be skipped.") ?>
- = t2("1 photo", "%count photos", $g2_stats["photos"]) ?>
+ = t("The eAccelerator PHP performance extension is known to cause issues. If you're using eAccelerator and having problems, please disable it while you do your import. One way to do that is to put php_value eaccelerator.enable 0 in gallery3/.htaccess") ?>
+ = t("Your most common thumbnail size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. Using the same value will speed up your import.",
+ array("g2_pixels" => $g2_sizes["thumb"]["size"],
+ "g3_pixels" => $thumb_size,
+ "url" => url::site("admin/theme_options"))) ?>
+ = t("Your most common intermediate size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. Using the same value will speed up your import.",
+ array("g2_pixels" => $g2_sizes["resize"]["size"],
+ "g3_pixels" => $resize_size,
+ "url" => url::site("admin/theme_options"))) ?>
+ endif ?>
-
- if ($g2_sizes["thumb"]["size"] && $thumb_size != $g2_sizes["thumb"]["size"]): ?>
-
- = t("Your most common thumbnail size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. Using the same value will speed up your import.",
- array("g2_pixels" => $g2_sizes["thumb"]["size"],
- "g3_pixels" => $thumb_size,
- "url" => url::site("admin/theme_options"))) ?>
-
- endif ?>
+
+
+ = t("Your Gallery 2 has the following importable data in it") ?>
+
- if ($g2_sizes["resize"]["size"] && $resize_size != $g2_sizes["resize"]["size"]): ?>
-
- = t("Your most common intermediate size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. Using the same value will speed up your import.",
- array("g2_pixels" => $g2_sizes["resize"]["size"],
- "g3_pixels" => $resize_size,
- "url" => url::site("admin/theme_options"))) ?>
+ ">
+ = t("Start importing!") ?>
+
endif ?>
-
- = t("You can begin your import on the maintenance page",
- array("url" => url::site("admin/maintenance"))) ?>