From 6a40e0a341d84e792990b22b10375b80e41bf6ba Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Tue, 9 Feb 2010 16:04:36 -0800
Subject: Revise the "review your permission" text to my liking.
---
modules/g2_import/views/admin_g2_import.html.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'modules/g2_import')
diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php
index 3b7afec2..5c520172 100644
--- a/modules/g2_import/views/admin_g2_import.html.php
+++ b/modules/g2_import/views/admin_g2_import.html.php
@@ -13,7 +13,7 @@
-
- = t("Please review album permissions after the import! Permissions are imported, but user specific and item specific permissions are not supported in Gallery 3 and thus ignored.") ?>
+ = t("Gallery 3 does not support per-user / per-item permissions. Review permissions after your import is done.") ?>
-
= t("The only supported file formats are JPG, PNG and GIF, FLV and MP4. Other formats will be skipped.") ?>
--
cgit v1.2.3
From a9f8b9479379dac14128114f35991a8a51d281ae Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Mon, 22 Feb 2010 21:08:59 -0800
Subject: Fix cut/paste typo
---
modules/g2_import/views/admin_g2_import.html.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'modules/g2_import')
diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php
index 5c520172..05cbab71 100644
--- a/modules/g2_import/views/admin_g2_import.html.php
+++ b/modules/g2_import/views/admin_g2_import.html.php
@@ -47,7 +47,7 @@
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.",
+ = t("Your most common intermediate size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 intermediate 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" => html::mark_clean(url::site("admin/theme_options")))) ?>
--
cgit v1.2.3
From ce39dc768c63fa5631450918180c1602363b7810 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Mon, 22 Feb 2010 21:21:04 -0800
Subject: Normalize invalid/missing G2 email addresses
---
modules/g2_import/helpers/g2_import.php | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
(limited to 'modules/g2_import')
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index faf08291..9a91770a 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -304,20 +304,27 @@ class g2_import_Core {
if ($user) {
$message = t("Loaded existing user: '%name'.", array("name" => $user->name));
} else {
+ $email = $g2_user->getEmail();
+ if (empty($email) || !valid::email($email)) {
+ $email = "unknown@unknown.com";
+ }
$user = identity::create_user($g2_user->getUsername(), $g2_user->getfullname(),
// Note: The API expects a password in cleartext.
// Just use the hashed password as an unpredictable
// value here. The user will have to reset the password.
- $g2_user->getHashedPassword(), $g2_user->getEmail());
+ $g2_user->getHashedPassword(), $email);
if (class_exists("User_Model") && $user instanceof User_Model) {
// This will work if G2's password is a PasswordHash password as well.
$user->hashed_password = $g2_user->getHashedPassword();
}
$message = t("Created user: '%name'.", array("name" => $user->name));
+ if ($email == "unknown@unknown.com") {
+ $message .= t("\n\tFixed invalid email (was '%invalid_email')",
+ array("invalid_email" => $g2_user->getEmail()));
+ }
}
$user->hashed_password = $g2_user->getHashedPassword();
- $user->email = $g2_user->getEmail() ? $g2_user->getEmail() : "unknown@unknown.com";
$user->locale = $g2_user->getLanguage();
foreach ($g2_groups as $g2_group_id => $g2_group_name) {
if ($g2_group_id == $g2_admin_group_id) {
--
cgit v1.2.3