mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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/branches/branch-1_6@1228 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user