Skip to content

Commit

Permalink
Using GENERATED_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
xong committed Nov 23, 2013
1 parent e5e8ca5 commit d2dbf57
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions classes/class.rexsearch.inc.php
Expand Up @@ -59,6 +59,7 @@ class RexSearch
var $includeColumns = array();
var $includeDirectories = array();
var $includePath;
var $generatedPath;
var $indexUnknownFileExtensions = false;
var $indexMediapool = false;
var $indexMissingFileExtensions = false;
Expand Down Expand Up @@ -184,6 +185,7 @@ function RexSearch($_clang = false, $_loadSettings = true, $_useStopwords = true
$this->languages = $REX['CLANG'];
$this->tablePrefix = $REX['TABLE_PREFIX'];
$this->includePath = $REX['INCLUDE_PATH'];
$this->generatedPath = $REX['GENERATED_PATH'];

This comment has been minimized.

Copy link
@xong

xong Dec 8, 2013

Author Owner

RexSearch muss nicht abwärtkompatibel sein. Da bin ich mal etwas eigennützig. Und wer das Ding einsetzt, kann sich über Github ja immer noch eine ältere Version ziehen.

$this->utf8 = rex_lang_is_utf8();
$this->documentRoot = realpath($_SERVER['DOCUMENT_ROOT']);
$this->mediaFolder = $REX['MEDIAFOLDER'];
Expand Down Expand Up @@ -606,7 +608,7 @@ function indexArticle($_id,$_clang = false)
{
$rex_article = new rex_article(intval($_id), $langID);

$article_content_file = $this->includePath.'/generated/articles/'.$_id.'.'.$langID.'.content';
$article_content_file = $this->generatedPath.'/articles/'.$_id.'.'.$langID.'.content';
if(!file_exists($article_content_file))
{
include_once ($this->includePath."/functions/function_rex_generate.inc.php");
Expand Down Expand Up @@ -838,7 +840,7 @@ function indexColumn($_table, $_column, $_idcol = false, $_id = false, $_start =
{
$rex_article = new rex_article(intval($value['id']), intval($value['clang']));
$teaser = true;
$article_content_file = $this->includePath.'/generated/articles/'.intval($value['id']).'.'.intval($value['clang']).'.content';
$article_content_file = $this->generatedPath.'/articles/'.intval($value['id']).'.'.intval($value['clang']).'.content';
if(!file_exists($article_content_file))
{
include_once ($this->includePath."/functions/function_rex_generate.inc.php");
Expand Down Expand Up @@ -946,7 +948,7 @@ function indexFile($_filename, $_doPlaintext = false, $_clang = false, $_fid = f

if(function_exists('exec'))
{
$tempFile = tempnam($this->includePath.'/generated/files/', 'rexsearch');
$tempFile = tempnam($this->generatedPath.'/files/', 'rexsearch');

if($this->utf8)
$encoding = 'UTF-8';
Expand Down

0 comments on commit d2dbf57

Please sign in to comment.