Commit cb5c72c38fc98bc58817ca314e56fb79ac6950f6
1 parent
13b194c3
Merged in from DEV trunk...
KTS-1594 "Support for Office 2007 Documents" Fixed. Committed By: Conrad Vermeulen Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8160 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
5 changed files
with
29 additions
and
14 deletions
plugins/ktcore/admin/manageHelp.php
| ... | ... | @@ -71,9 +71,11 @@ class ManageHelpDispatcher extends KTAdminDispatcher { |
| 71 | 71 | return $oTemplate->render($aTemplateData); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - function getReplacementItemData($oHelpReplacement) { | |
| 74 | + function getReplacementItemData($oHelpReplacement, $sTitle = null) { | |
| 75 | 75 | $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _kt('Help Administration')); |
| 76 | - $this->oPage->setTitle(_kt('Editing: ') . $oHelpReplacement->getTitle()); | |
| 76 | + | |
| 77 | + $sTitle = (is_null($sTitle)) ? $oHelpReplacement->getTitle() : $sTitle; | |
| 78 | + $this->oPage->setTitle(_kt('Editing: ') . $sTitle); | |
| 77 | 79 | $oTemplating =& KTTemplating::getSingleton(); |
| 78 | 80 | $oTemplate = $oTemplating->loadTemplate("ktcore/manage_help_item"); |
| 79 | 81 | $aTemplateData = array( |
| ... | ... | @@ -89,10 +91,15 @@ class ManageHelpDispatcher extends KTAdminDispatcher { |
| 89 | 91 | function do_editReplacement() { |
| 90 | 92 | $id = KTUtil::arrayGet($_REQUEST, 'id'); |
| 91 | 93 | $oHelpReplacement = KTHelpReplacement::get($id); |
| 94 | + $sTitle = $oHelpReplacement->getTitle(); | |
| 95 | + //Changing " in title to " so title is interpreted properly | |
| 96 | + $oHelpReplacement->setTitle(htmlentities($sTitle, ENT_QUOTES, 'utf-8')); | |
| 97 | + | |
| 98 | + | |
| 92 | 99 | if (PEAR::isError($oHelpReplacement)) { |
| 93 | 100 | return $this->errorRedirectToMain(_kt("Could not find specified item")); |
| 94 | 101 | } |
| 95 | - return $this->getReplacementItemData($oHelpReplacement); | |
| 102 | + return $this->getReplacementItemData($oHelpReplacement, $sTitle); | |
| 96 | 103 | } |
| 97 | 104 | |
| 98 | 105 | function do_deleteReplacement() { |
| ... | ... | @@ -119,11 +126,12 @@ class ManageHelpDispatcher extends KTAdminDispatcher { |
| 119 | 126 | return $this->errorRedirectToMain(_kt("No description given")); |
| 120 | 127 | } |
| 121 | 128 | $oHelpReplacement->setDescription($description); |
| 122 | - | |
| 129 | + | |
| 123 | 130 | $title = KTUtil::arrayGet($_REQUEST, 'title'); |
| 124 | 131 | if (empty($title)) { |
| 125 | 132 | return $this->errorRedirectToMain(_kt("No title given")); |
| 126 | 133 | } |
| 134 | + | |
| 127 | 135 | $oHelpReplacement->setTitle($title); |
| 128 | 136 | |
| 129 | 137 | $res = $oHelpReplacement->update(); | ... | ... |
search2/indexing/extractorCore.inc.php
| ... | ... | @@ -382,7 +382,7 @@ abstract class ExternalDocumentExtractor extends DocumentExtractor |
| 382 | 382 | |
| 383 | 383 | $script = "#!/bin/sh\n"; |
| 384 | 384 | $script .= "# This is an auto generated file. \n"; |
| 385 | - $script .= $cmd . ' 2>>"' . $script_out . "\"\n"; | |
| 385 | + $script .= $cmd . ' 2>>"' . $script_out . "\" >/dev/null\n"; | |
| 386 | 386 | $script .= "exit $?\n"; |
| 387 | 387 | } |
| 388 | 388 | ... | ... |
search2/indexing/extractors/OpenXmlTextExtractor.inc.php
| ... | ... | @@ -43,6 +43,7 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor |
| 43 | 43 | $config = KTConfig::getSingleton(); |
| 44 | 44 | |
| 45 | 45 | $this->unzip = KTUtil::findCommand("import/unzip", 'unzip'); |
| 46 | + $this->unzip = str_replace('\\','/',$this->unzip); | |
| 46 | 47 | $this->unzip_params = $config->get('extractorParameters/unzip', '"{source}" "{part}" -d "{target_dir}"'); |
| 47 | 48 | parent::__construct(); |
| 48 | 49 | } |
| ... | ... | @@ -148,9 +149,14 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor |
| 148 | 149 | $time = 'openxml_'. time() . '-' . $docid; |
| 149 | 150 | $this->openxml_dir = $temp_dir . '/' . $time; |
| 150 | 151 | |
| 151 | - $cmd = $this->unzip . ' ' . str_replace( | |
| 152 | + $this->sourcefile = str_replace('\\','/',$this->sourcefile); | |
| 153 | + $this->openxml_dir = str_replace('\\','/',$this->openxml_dir); | |
| 154 | + | |
| 155 | + $cmd = '"' . $this->unzip . '"' . ' ' . str_replace( | |
| 152 | 156 | array('{source}','{part}', '{target_dir}'), |
| 153 | - array($this->sourcefile, '\[Content_Types\].xml',$this->openxml_dir), $this->unzip_params); | |
| 157 | + array($this->sourcefile, '*Content_Types*.xml',$this->openxml_dir), $this->unzip_params); | |
| 158 | + | |
| 159 | + $cmd = str_replace('\\','/', $cmd); | |
| 154 | 160 | |
| 155 | 161 | if (!$this->exec($cmd)) |
| 156 | 162 | { |
| ... | ... | @@ -192,8 +198,9 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor |
| 192 | 198 | { |
| 193 | 199 | $filename = substr($filename,1); |
| 194 | 200 | } |
| 201 | + $filename = str_replace('\\','/',$filename); | |
| 195 | 202 | |
| 196 | - $cmd = $this->unzip . ' ' . str_replace( | |
| 203 | + $cmd = '"' .$this->unzip . '"' . ' ' . str_replace( | |
| 197 | 204 | array('{source}','{part}', '{target_dir}'), |
| 198 | 205 | array($this->sourcefile, $filename,$this->openxml_dir), $this->unzip_params); |
| 199 | 206 | ... | ... |
thirdparty/pear/HTTP/Upload.php
| ... | ... | @@ -205,7 +205,7 @@ class HTTP_Upload_Error extends PEAR |
| 205 | 205 | 'en' => 'The file was only partially uploaded.', |
| 206 | 206 | 'de' => 'Die Datei wurde unvollständig übertragen.', |
| 207 | 207 | 'nl' => 'Het bestand is slechts gedeeltelijk geupload.', |
| 208 | - 'pt_BR' => 'O arquivo não foi enviado por completo.' | |
| 208 | + 'pt_BR' => 'O arquivo n�o foi enviado por completo.' | |
| 209 | 209 | ), |
| 210 | 210 | 'ERROR' => array( |
| 211 | 211 | 'es' => 'Error en subida:', |
| ... | ... | @@ -215,7 +215,7 @@ class HTTP_Upload_Error extends PEAR |
| 215 | 215 | 'pt_BR' => 'Erro de upload:' |
| 216 | 216 | ), |
| 217 | 217 | 'DEV_NO_DEF_FILE' => array( |
| 218 | - 'es' => 'No está definido en el formulario este nombre de fichero como <input type="file" name=?>.', | |
| 218 | + 'es' => 'No est� definido en el formulario este nombre de fichero como <input type="file" name=?>.', | |
| 219 | 219 | 'en' => 'This filename is not defined in the form as <input type="file" name=?>.', |
| 220 | 220 | 'de' => 'Dieser Dateiname ist im Formular nicht als <input type="file" name=?> definiert.', |
| 221 | 221 | '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 |
| 660 | 660 | */ |
| 661 | 661 | function nameToSafe($name, $maxlen=250) |
| 662 | 662 | { |
| 663 | - $noalpha = 'ÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÀÈÌÒÙàèìòùÄËÏÖÜäëïöüÿÃãÕõÅåÑñÇç@°ºª'; | |
| 663 | + $noalpha = '�����������������������������������������������������@���'; | |
| 664 | 664 | $alpha = 'AEIOUYaeiouyAEIOUaeiouAEIOUaeiouAEIOUaeiouyAaOoAaNnCcaooa'; |
| 665 | 665 | |
| 666 | 666 | $name = substr($name, 0, $maxlen); | ... | ... |
thirdparty/pear/Net/Ping.php
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | // | Authors: Martin Jansen <mj@php.net> | |
| 17 | 17 | // | Tomas V.V.Cox <cox@idecnet.com> | |
| 18 | 18 | // | Jan Lehnardt <jan@php.net> | |
| 19 | -// | Kai Schröder <k.schroeder@php.net> | | |
| 19 | +// | Kai Schr�der <k.schroeder@php.net> | | |
| 20 | 20 | // +----------------------------------------------------------------------+ |
| 21 | 21 | // |
| 22 | 22 | // $Id$ |
| ... | ... | @@ -408,7 +408,7 @@ class Net_Ping |
| 408 | 408 | * @param mixed $error a PEAR error or a string with the error message |
| 409 | 409 | * @return bool false |
| 410 | 410 | * @access private |
| 411 | - * @author Kai Schröder <k.schroeder@php.net> | |
| 411 | + * @author Kai Schr�der <k.schroeder@php.net> | |
| 412 | 412 | */ |
| 413 | 413 | function _raiseError($error) |
| 414 | 414 | { |
| ... | ... | @@ -864,7 +864,7 @@ class Net_Ping_Result |
| 864 | 864 | /** |
| 865 | 865 | * Parses the output of Windows' ping command |
| 866 | 866 | * |
| 867 | - * @author Kai Schröder <k.schroeder@php.net> | |
| 867 | + * @author Kai Schr�der <k.schroeder@php.net> | |
| 868 | 868 | * @access private |
| 869 | 869 | */ |
| 870 | 870 | function _parseResultwindows() | ... | ... |