aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-04-21 00:04:11 +0000
committerrvelices <rv-github@modusoptimus.com>2006-04-21 00:04:11 +0000
commitc000b9ed60d13c1a40df39f4d5f16bbd5bfd92b0 (patch)
treecccf01e3a54fb5c9e7c9a9dbca814fe7adbe4f41
parentb65bbc570ef496abc6dc72c4a0b86ebfcf767ad4 (diff)
merge r1228 from branch-1_6 into trunk
bug 345: cannot browse categories (Club Internet modified web server provides PATH_INFO even if it is empty) fix 339: also added in create_listing_file.php git-svn-id: http://piwigo.org/svn/trunk@1229 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/section_init.inc.php2
-rw-r--r--tools/create_listing_file.php10
2 files changed, 10 insertions, 2 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index c29686e6f..3a27882ba 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -53,7 +53,7 @@
$page['section'] = 'categories';
-if ( isset($_SERVER["PATH_INFO"]) )
+if ( isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) )
{
$rewritten = $_SERVER["PATH_INFO"];
$rewritten = str_replace('//', '/', $rewritten);
diff --git a/tools/create_listing_file.php b/tools/create_listing_file.php
index 112b4ff14..377dba071 100644
--- a/tools/create_listing_file.php
+++ b/tools/create_listing_file.php
@@ -165,7 +165,15 @@ function get_sync_iptc_data($file)
$iptc['keywords'] = preg_replace('/[.;]/', ',', $iptc['keywords']);
$iptc['keywords'] = preg_replace('/^,+|,+$/', '', $iptc['keywords']);
}
-
+ $iptc['keywords'] = implode(
+ ',',
+ array_unique(
+ explode(
+ ',',
+ $iptc['keywords']
+ )
+ )
+ );
return $iptc;
}