From dff1a536961cd401b8e133e260fcc3cca7c13dc6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 25 Oct 2010 21:04:48 -0700 Subject: All modules should be named Xxx_Core for extensibility. Fixes #1458. --- modules/g2_import/models/g2_map.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/g2_import') diff --git a/modules/g2_import/models/g2_map.php b/modules/g2_import/models/g2_map.php index a20f48d6..8b96050d 100644 --- a/modules/g2_import/models/g2_map.php +++ b/modules/g2_import/models/g2_map.php @@ -17,5 +17,5 @@ * 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_Map_Model extends ORM { +class G2_Map_Model_Core extends ORM { } -- cgit v1.2.3 From 35d933cf7f8db4cfa79e4985e6b38433f4457a45 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 8 Nov 2010 10:06:56 -0800 Subject: Dump something in the logs if GalleryEmbed::init() fails. --- modules/g2_import/helpers/g2_import.php | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/g2_import') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 515eb73d..678dac3b 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -157,6 +157,7 @@ class g2_import_Core { $ret = GalleryEmbed::init(); if ($ret) { + Kohana_Log::add("error", "Gallery 2 call failed with: " . $ret->getAsText()); return false; } -- cgit v1.2.3 From f0781a9162129394236ef9c8cd68392d59b52791 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 9 Nov 2010 09:16:07 -0800 Subject: Add an extra line break after the RewriteBase line so that the RewriteBase and RewriteRule lines don't get merged in the resulting textarea. Fixes #1481. --- modules/g2_import/views/admin_g2_import.html.php | 1 + 1 file changed, 1 insertion(+) (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 564bea9f..cb13363a 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -89,6 +89,7 @@ Options +FollowSymLinks RewriteEngine On RewriteBase + RewriteRule ^(.*)$ [QSA,L,R=301] </IfModule> -- cgit v1.2.3 From a36c894c636bfb70f0921aa6c7eb9393d61d772b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 28 Nov 2010 17:01:51 -0800 Subject: Fix g2_import::g2_url() to only replace the $g2_base_url once at the beginning of the url string. Also, only do this when we're about to put it into the map, not when we're getting the g2 url else the url is mangled for other purposes. Fixes #1512. --- modules/g2_import/helpers/g2_import.php | 8 ++++++-- 1 file changed, 6 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 678dac3b..8de5ce44 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -1200,6 +1200,11 @@ class g2_import_Core { $g2_map->g3_id = $g3_id; $g2_map->g2_id = $g2_id; $g2_map->resource_type = $resource_type; + + if (strpos($g2_url, self::$g2_base_url) === 0) { + $g2_url = substr($g2_url, strlen(self::$g2_base_url)); + } + $g2_map->g2_url = $g2_url; $g2_map->save(); self::$map[$g2_id] = $g3_id; @@ -1212,13 +1217,12 @@ class g2_import_Core { static function g2_url($params) { global $gallery; - $url = $gallery->getUrlGenerator()->generateUrl( + return $gallery->getUrlGenerator()->generateUrl( $params, array("forceSessionId" => false, "htmlEntities" => false, "urlEncode" => false, "useAuthToken" => false)); - return str_replace(self::$g2_base_url, "", $url); } static function lower_error_reporting() { -- cgit v1.2.3