Hotfix an der GalerieSchabone, mal wieder wegen derDateinamen
Changes to be committed: modified: index.php.tmpl
This commit is contained in:
@@ -8,6 +8,13 @@
|
|||||||
|
|
||||||
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
||||||
|
|
||||||
|
function myUrlEncode($string) {
|
||||||
|
$entities = array( '%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');
|
||||||
|
$replacements = array( '!', '*', "'", "(", ")", ";", ":", "@", "&", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]");
|
||||||
|
//return str_replace($entities, $replacements, urlencode($string));
|
||||||
|
return str_replace($entities, $replacements, rawurlencode($string));
|
||||||
|
}
|
||||||
|
|
||||||
function startsWith($haystack, $needle){
|
function startsWith($haystack, $needle){
|
||||||
$length = strlen($needle);
|
$length = strlen($needle);
|
||||||
return (substr($haystack, 0, $length) === $needle);
|
return (substr($haystack, 0, $length) === $needle);
|
||||||
@@ -55,6 +62,19 @@ return $retVal;
|
|||||||
$galleryId = "0";
|
$galleryId = "0";
|
||||||
$pickedImages = array();
|
$pickedImages = array();
|
||||||
|
|
||||||
|
// Wie es scheint ist sind die Dateinamen auf bplaced in "ISO-8859-1"
|
||||||
|
array_walk(
|
||||||
|
$imgList,
|
||||||
|
function (&$value, $key) {
|
||||||
|
$value = iconv( "UTF-8", "ISO-8859-1",$value);
|
||||||
|
//$value = urlencode($value);
|
||||||
|
//$value = urlencode($value);
|
||||||
|
//$value = myUrlEncode($value);
|
||||||
|
//$value=implode('/', array_map('rawurlencode', explode('/', $value)));
|
||||||
|
$value=implode('/', array_map('myUrlEncode', explode('/', $value)));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// echo("imgList: "); print_r($imgList);
|
// echo("imgList: "); print_r($imgList);
|
||||||
// foreach($imgList as $img){
|
// foreach($imgList as $img){
|
||||||
// echo(" ".$img." startsWith images/ :".startsWith($img, "images/")."\n");
|
// echo(" ".$img." startsWith images/ :".startsWith($img, "images/")."\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user