diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-15 00:32:19 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-15 00:32:19 +0000 |
commit | 1854075a62c6ca0422040b4e5ebf89088b0d02b2 (patch) | |
tree | 4c725cb4ef2b6eab95c0db23cfedcfb3c1406be4 /h-source/Application/Include | |
parent | 99e87e1869e49c67bea2b779283def0e98f39bca (diff) |
added wiki - part 1
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r-- | h-source/Application/Include/languages.php | 18 | ||||
-rw-r--r-- | h-source/Application/Include/myFunctions.php | 48 |
2 files changed, 62 insertions, 4 deletions
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 9b0d9ab..4bfb7fe 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -175,6 +175,24 @@ class Lang "at" => "alle ore", "last modifications" => "ultime modifiche", "watch all modifications" => "guarda tutte le modifiche", + "title" => "titolo", + "text of the wiki page" => "testo della pagina", + "the wiki page has not been found" => "la pagina della wiki non è stata trovata", + "Page not-found" => "Pagina non trovata", + "Insert" => "Inserisci", + "Update" => "Modifica", + "History" => "History", + "Revision" => "Revisione", + "Differences" => "Differenze", + "Insert a new wiki page" => "Inserisci una nuova pagina nella wiki", + "Edit the wiki page" => "Modifica la pagina della wiki", + "Make current" => "Rendi revisione corrente", + "I want to make this revision the current revision" => "Voglio che questa revisione diventi quella corrente", + "Confirm" => "Conferma", + "Make this revision the current revision of the page" => "Rendi questa revisione la revisione corrente della pagina", + "This wiki page has been hidden" => "Questa pagina della wiki è stata nascosta", + "Talk" => "Discussione", + "Talk page of the wiki page" => "Pagina di discussione della pagina della wiki" ), 'es' => array ( diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index daefb59..0f87893 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -29,12 +29,39 @@ function encodeUrl($url) $url = str_replace(')','-',$url); $url = str_replace('/','-',$url); $url = str_replace('@','-at-',$url); - $url = urlencode($url); -// $url = html_entity_decode($url, ENT_QUOTES); -// $url = xml_encode($url); - return $url; + + $temp = null; + for ($i=0;$i<strlen($url); $i++) + { + if (strcmp($url[$i],' ') === 0) + { + $temp .= '-'; + } + else + { + if (preg_match('/^[a-zA-Z0-9\-]$/',$url[$i])) $temp .= $url[$i]; + } + } + + $temp = urlencode($temp); + return $temp; } +// function encodeUrl($url) +// { +// $url = str_replace(' ','-',$url); +// $url = str_replace('[','-',$url); +// $url = str_replace(']','-',$url); +// $url = str_replace('(','-',$url); +// $url = str_replace(')','-',$url); +// $url = str_replace('/','-',$url); +// $url = str_replace('@','-at-',$url); +// $url = urlencode($url); +// // $url = html_entity_decode($url, ENT_QUOTES); +// // $url = xml_encode($url); +// return $url; +// } + function smartDate($uglyDate = null, $lang = 'en') { @@ -472,4 +499,17 @@ function getUrlsFromIdHard($id_hard) return array('urlView'=>$urlView,'urlTalk'=>$urlTalk,'modelName'=>$deviceName); +} + +function getDiffArray($associativeArray, $oldArray, $newArray) +{ + $diffArray = array(); + foreach ($associativeArray as $field => $label) + { + if (array_key_exists($field,$oldArray) and array_key_exists($field,$newArray)) + { + $diffArray[$label] = htmlDiff($oldArray[$field], $newArray[$field]); + } + } + return $diffArray; }
\ No newline at end of file |