diff --git a/plugins/ktcore/admin/manageHelp.php b/plugins/ktcore/admin/manageHelp.php index 2a1a26c..80fa73e 100755 --- a/plugins/ktcore/admin/manageHelp.php +++ b/plugins/ktcore/admin/manageHelp.php @@ -71,9 +71,11 @@ class ManageHelpDispatcher extends KTAdminDispatcher { return $oTemplate->render($aTemplateData); } - function getReplacementItemData($oHelpReplacement) { + function getReplacementItemData($oHelpReplacement, $sTitle = null) { $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _kt('Help Administration')); - $this->oPage->setTitle(_kt('Editing: ') . $oHelpReplacement->getTitle()); + + $sTitle = (is_null($sTitle)) ? $oHelpReplacement->getTitle() : $sTitle; + $this->oPage->setTitle(_kt('Editing: ') . $sTitle); $oTemplating =& KTTemplating::getSingleton(); $oTemplate = $oTemplating->loadTemplate("ktcore/manage_help_item"); $aTemplateData = array( @@ -89,10 +91,15 @@ class ManageHelpDispatcher extends KTAdminDispatcher { function do_editReplacement() { $id = KTUtil::arrayGet($_REQUEST, 'id'); $oHelpReplacement = KTHelpReplacement::get($id); + $sTitle = $oHelpReplacement->getTitle(); + //Changing " in title to " so title is interpreted properly + $oHelpReplacement->setTitle(htmlentities($sTitle, ENT_QUOTES, 'utf-8')); + + if (PEAR::isError($oHelpReplacement)) { return $this->errorRedirectToMain(_kt("Could not find specified item")); } - return $this->getReplacementItemData($oHelpReplacement); + return $this->getReplacementItemData($oHelpReplacement, $sTitle); } function do_deleteReplacement() { @@ -119,11 +126,12 @@ class ManageHelpDispatcher extends KTAdminDispatcher { return $this->errorRedirectToMain(_kt("No description given")); } $oHelpReplacement->setDescription($description); - + $title = KTUtil::arrayGet($_REQUEST, 'title'); if (empty($title)) { return $this->errorRedirectToMain(_kt("No title given")); } + $oHelpReplacement->setTitle($title); $res = $oHelpReplacement->update(); diff --git a/search2/indexing/extractorCore.inc.php b/search2/indexing/extractorCore.inc.php index b205fba..9f01d77 100644 --- a/search2/indexing/extractorCore.inc.php +++ b/search2/indexing/extractorCore.inc.php @@ -382,7 +382,7 @@ abstract class ExternalDocumentExtractor extends DocumentExtractor $script = "#!/bin/sh\n"; $script .= "# This is an auto generated file. \n"; - $script .= $cmd . ' 2>>"' . $script_out . "\"\n"; + $script .= $cmd . ' 2>>"' . $script_out . "\" >/dev/null\n"; $script .= "exit $?\n"; } diff --git a/search2/indexing/extractors/OpenXmlTextExtractor.inc.php b/search2/indexing/extractors/OpenXmlTextExtractor.inc.php index b1baf72..209b62c 100644 --- a/search2/indexing/extractors/OpenXmlTextExtractor.inc.php +++ b/search2/indexing/extractors/OpenXmlTextExtractor.inc.php @@ -43,6 +43,7 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor $config = KTConfig::getSingleton(); $this->unzip = KTUtil::findCommand("import/unzip", 'unzip'); + $this->unzip = str_replace('\\','/',$this->unzip); $this->unzip_params = $config->get('extractorParameters/unzip', '"{source}" "{part}" -d "{target_dir}"'); parent::__construct(); } @@ -148,9 +149,14 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor $time = 'openxml_'. time() . '-' . $docid; $this->openxml_dir = $temp_dir . '/' . $time; - $cmd = $this->unzip . ' ' . str_replace( + $this->sourcefile = str_replace('\\','/',$this->sourcefile); + $this->openxml_dir = str_replace('\\','/',$this->openxml_dir); + + $cmd = '"' . $this->unzip . '"' . ' ' . str_replace( array('{source}','{part}', '{target_dir}'), - array($this->sourcefile, '\[Content_Types\].xml',$this->openxml_dir), $this->unzip_params); + array($this->sourcefile, '*Content_Types*.xml',$this->openxml_dir), $this->unzip_params); + + $cmd = str_replace('\\','/', $cmd); if (!$this->exec($cmd)) { @@ -192,8 +198,9 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor { $filename = substr($filename,1); } + $filename = str_replace('\\','/',$filename); - $cmd = $this->unzip . ' ' . str_replace( + $cmd = '"' .$this->unzip . '"' . ' ' . str_replace( array('{source}','{part}', '{target_dir}'), array($this->sourcefile, $filename,$this->openxml_dir), $this->unzip_params); diff --git a/thirdparty/pear/HTTP/Upload.php b/thirdparty/pear/HTTP/Upload.php index d2390e0..10b8276 100644 --- a/thirdparty/pear/HTTP/Upload.php +++ b/thirdparty/pear/HTTP/Upload.php @@ -205,7 +205,7 @@ class HTTP_Upload_Error extends PEAR 'en' => 'The file was only partially uploaded.', 'de' => 'Die Datei wurde unvollständig übertragen.', 'nl' => 'Het bestand is slechts gedeeltelijk geupload.', - 'pt_BR' => 'O arquivo não foi enviado por completo.' + 'pt_BR' => 'O arquivo n�o foi enviado por completo.' ), 'ERROR' => array( 'es' => 'Error en subida:', @@ -215,7 +215,7 @@ class HTTP_Upload_Error extends PEAR 'pt_BR' => 'Erro de upload:' ), 'DEV_NO_DEF_FILE' => array( - 'es' => 'No está definido en el formulario este nombre de fichero como <input type="file" name=?>.', + 'es' => 'No est� definido en el formulario este nombre de fichero como <input type="file" name=?>.', 'en' => 'This filename is not defined in the form as <input type="file" name=?>.', 'de' => 'Dieser Dateiname ist im Formular nicht als <input type="file" name=?> definiert.', 'nl' => 'Deze bestandsnaam is niett gedefineerd in het formulier als <input type="file" name=?>.' @@ -660,7 +660,7 @@ class HTTP_Upload_File extends HTTP_Upload_Error */ function nameToSafe($name, $maxlen=250) { - $noalpha = 'ÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÀÈÌÒÙàèìòùÄËÏÖÜäëïöüÿÃãÕõÅåÑñÇç@°ºª'; + $noalpha = '�����������������������������������������������������@���'; $alpha = 'AEIOUYaeiouyAEIOUaeiouAEIOUaeiouAEIOUaeiouyAaOoAaNnCcaooa'; $name = substr($name, 0, $maxlen); diff --git a/thirdparty/pear/Net/Ping.php b/thirdparty/pear/Net/Ping.php index 8446cf5..b2c254b 100644 --- a/thirdparty/pear/Net/Ping.php +++ b/thirdparty/pear/Net/Ping.php @@ -16,7 +16,7 @@ // | Authors: Martin Jansen | // | Tomas V.V.Cox | // | Jan Lehnardt | -// | Kai Schröder | +// | Kai Schr�der | // +----------------------------------------------------------------------+ // // $Id$ @@ -408,7 +408,7 @@ class Net_Ping * @param mixed $error a PEAR error or a string with the error message * @return bool false * @access private - * @author Kai Schröder + * @author Kai Schr�der */ function _raiseError($error) { @@ -864,7 +864,7 @@ class Net_Ping_Result /** * Parses the output of Windows' ping command * - * @author Kai Schröder + * @author Kai Schr�der * @access private */ function _parseResultwindows()