Commit 903ffcea2f2be0209a48ec2cae74eb85544075e8

Authored by Jarrett Jordaan
1 parent b559b3c7

Lucene properties file written on the fly.

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
setup/wizard/lib/services/unixLucene.php
@@ -243,19 +243,19 @@ class unixLucene extends unixService { @@ -243,19 +243,19 @@ class unixLucene extends unixService {
243 */ 243 */
244 private function writeLuceneProperties() { 244 private function writeLuceneProperties() {
245 // Check if bin is readable and writable 245 // Check if bin is readable and writable
246 - $fileLoc = $this->getluceneDir()."KnowledgeTreeIndexer.properties";  
247 - $fp = fopen($fileLoc, "w+");  
248 - $content = "server.port=8875\n";  
249 - $content .= "server.paranoid=false\n";  
250 - $content .= "server.accept=127.0.0.1\n";  
251 - $content .= "server.deny=\n";  
252 - $conf = $this->util->getDataFromSession('configuration');  
253 - $varDirectory = $conf['paths']['varDirectory']['path'];  
254 - $content .= "indexer.directory=$varDirectory\n";  
255 - $content .= "indexer.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer\n";  
256 - fwrite($fp, $content);  
257 - fclose($fp);  
258 - $this->util->pexec("chmod 777 $fileLoc"); 246 + $fileLoc = $this->getluceneDir()."KnowledgeTreeIndexer.properties";
  247 + $fp = fopen($fileLoc, "w+");
  248 + $content = "server.port=8875\n";
  249 + $content .= "server.paranoid=false\n";
  250 + $content .= "server.accept=127.0.0.1\n";
  251 + $content .= "server.deny=\n";
  252 + $conf = $this->util->getDataFromSession('configuration');
  253 + $varDirectory = $conf['paths']['varDirectory']['path'];
  254 + $content .= "indexer.directory=$varDirectory\n";
  255 + $content .= "indexer.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer\n";
  256 + fwrite($fp, $content);
  257 + fclose($fp);
  258 + @chmod($fileLoc, 0644);
259 } 259 }
260 } 260 }
261 ?> 261 ?>
262 \ No newline at end of file 262 \ No newline at end of file