Skip to content

Commit

Permalink
v3.3.11 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
tablatronix committed Aug 10, 2016
2 parents 8259359 + 546f00b commit 62d79ec
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 7 deletions.
22 changes: 22 additions & 0 deletions admin/inc/basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -1386,4 +1386,26 @@ function strip_content($str, $pattern = '/[({]%.*?%[})]/'){
return preg_replace($pattern, '', $str);
}

/**
* perform transliteration conversion on string
* @since 3.3.11
* @param str $str string to convert
* @return str str after transliteration replacement array ran on it
*/
function doTransliteration($str){
if (getTransliteration() && is_array($translit=getTransliteration()) && count($translit>0)) {
$str = str_replace(array_keys($translit),array_values($translit),$str);
}
return $str;
}

/**
* get transliteration set as defined in i18n
* @since 3.3.11
* @return str
*/
function getTransliteration(){
return i18n_r("TRANSLITERATION");
}

?>
2 changes: 1 addition & 1 deletion admin/inc/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

$site_full_name = 'GetSimple';
$site_version_no = '3.3.10';
$site_version_no = '3.3.11';
$name_url_clean = lowercase(str_replace(' ','-',$site_full_name));
$ver_no_clean = str_replace('.','',$site_version_no);
$site_link_back_url = 'http://get-simple.info/';
Expand Down
51 changes: 50 additions & 1 deletion admin/lang/en_US.php
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,55 @@
"API_REGEN_DISCLAIMER" => "When you regenerate your API Key, you will need to enter the new key into any external application using this API to connect to your website.",
"API_CONFIRM" => "ARE YOU SURE?",

/*
* Default transliteration
*/
"TRANSLITERATION" => array(
// Roman
'á'=>'a', 'é'=>'e', 'í'=>'i', 'ó'=>'o', 'ú'=>'u',
'Á'=>'a', 'É'=>'e', 'Í'=>'i', 'Ó'=>'o', 'Ú'=>'u',
'à'=>'a', 'è'=>'e', 'ì'=>'i', 'ò'=>'o', 'ù'=>'u',
'À'=>'a', 'È'=>'e', 'Ì'=>'i', 'Ò'=>'o', 'Ù'=>'u',
'ä'=>'a', 'ë'=>'e', 'ï'=>'i', 'ö'=>'o', 'ü'=>'u',
'Ä'=>'a', 'Ë'=>'e', 'Ï'=>'i', 'Ö'=>'o', 'Ü'=>'u',
'â'=>'a', 'ê'=>'e', 'î'=>'i', 'ô'=>'o', 'û'=>'u',
'Â'=>'a', 'Ê'=>'e', 'Î'=>'i', 'Ô'=>'o', 'Û'=>'u',
'ñ'=>'n', 'ç'=>'c',
'Ñ'=>'n', 'Ç'=>'c',
'¿'=>'', '¡'=>'',
// special Czech chars with diacritics (except some)
"ě"=>"e","Ě"=>"E","š"=>"s","Š"=>"S","č"=>"c",
"Č"=>"c","ř"=>"r","Ř"=>"r","ž"=>"z","Ž"=>"z",
"ý"=>"y","Ý"=>"y",
"ů"=>"u","Ů"=>"u","ť"=>"t","Ť"=>"t",
"ď"=>"d","Ď"=>"d","ň"=>"n","Ň"=>"n",
//special Slovakian chars with diacritics (except some)
"ĺ"=>"l","ľ"=>"l","ŕ"=>"r",
"Ĺ"=>"l","Ľ"=>"L","Ŕ"=>"r",
// Polish
"Ą"=>"a","Ć"=>"c","Ę"=>"e",
"Ł"=>"l","Ń"=>"n",
"Ś"=>"s","Ź"=>"z","Ż"=>"z",
"ą"=>"a","ć"=>"c","ę"=>"e",
"ł"=>"l","ń"=>"n",
"ś"=>"s","ź"=>"z","ż"=>"z",
// Russian
"А"=>"a","Б"=>"b","В"=>"v",
"Г"=>"g","Д"=>"d","Е"=>"e","Ё"=>"yo","Ж"=>"zh",
"З"=>"z","И"=>"i","Й"=>"j","К"=>"k","Л"=>"l",
"М"=>"m","Н"=>"n","О"=>"o","П"=>"p","Р"=>"r",
"С"=>"s","Т"=>"t","У"=>"u","Ф"=>"f","Х"=>"h",
"Ц"=>"c","Ч"=>"ch","Ш"=>"sh","Щ"=>"shh","Ъ"=>"'",
"Ы"=>"y","Ь"=>"","Э"=>"e","Ю"=>"yu","Я"=>"ya",
"а"=>"a","б"=>"b","в"=>"v","г"=>"g","д"=>"d",
"е"=>"e","ё"=>"yo","ж"=>"zh","з"=>"z","и"=>"i",
"й"=>"j","к"=>"k","л"=>"l","м"=>"m","н"=>"n",
"о"=>"o","п"=>"p","р"=>"r","с"=>"s","т"=>"t",
"у"=>"u","ф"=>"f","х"=>"h","ц"=>"c","ч"=>"ch",
"ш"=>"sh","щ"=>"shh","ъ"=>"","ы"=>"y","ь"=>"",

"э"=>"e","ю"=>"yu","я"=>"ya"
),

"X" => "not translated",

Expand All @@ -539,4 +588,4 @@

);

?>
?>
1 change: 1 addition & 0 deletions admin/template/css.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 12px;
background: #f6f6f6;
color: black;
}

a img,
Expand Down
13 changes: 9 additions & 4 deletions admin/upload-uploadify.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
if ($_POST['sessionHash'] === $SESSIONHASH) {
if (!empty($_FILES)){

$tempFile = $_FILES['Filedata']['tmp_name'];
$name = clean_img_name(to7bit($_FILES['Filedata']['name']));
$targetPath = (isset($_POST['path'])) ? GSDATAUPLOADPATH.$_POST['path']."/" : GSDATAUPLOADPATH;
$tempFile = $_FILES['Filedata']['tmp_name'];

$file = $_FILES['Filedata']['name'];
$extension = pathinfo($file,PATHINFO_EXTENSION);

$targetFile = str_replace('//','/',$targetPath) . $name;
$name = pathinfo($file,PATHINFO_FILENAME);
$name = clean_img_name(to7bit($name));

$targetPath = (isset($_POST['path'])) ? GSDATAUPLOADPATH.$_POST['path']."/" : GSDATAUPLOADPATH;
$targetFile = str_replace('//','/',$targetPath) . $name . '.'.$extension;

//validate file
if (validate_safe_file($tempFile, $_FILES["Filedata"]["name"])) {
Expand Down
9 changes: 8 additions & 1 deletion admin/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@

//set variables
$count = '1';
$base = clean_img_name(to7bit($_FILES["file"]["name"][$i]));
$file = $_FILES["file"]["name"][$i];

$extension = pathinfo($file,PATHINFO_EXTENSION);

$name = pathinfo($file,PATHINFO_FILENAME);
$name = clean_img_name(to7bit($name));
$base = $name . '.' . $extension;

$file_loc = $path . $base;

//prevent overwriting
Expand Down

0 comments on commit 62d79ec

Please sign in to comment.