mirror of
https://github.com/agdsn/ancient-weatherstation.git
synced 2026-06-19 23:07:59 +00:00
Frontend:
a summary-view added bugfixes git-svn-id: file:///home/jan/tmp/wetterstation/trunk@117 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
@@ -15,9 +15,11 @@ class Parser{
|
||||
if(is_array($newContent)){
|
||||
for($i = 0; $i < count($newContent); $i++){
|
||||
array_push($this->contentArray, $newContent[$i]);
|
||||
//echo $newContent[$i]."\n";
|
||||
}
|
||||
} else {
|
||||
array_push($this->contentArray, $newContent);
|
||||
//echo $newContent."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +33,7 @@ class Parser{
|
||||
|
||||
|
||||
/* File Parsen */
|
||||
function parseContent($fileName, & $callingObject, $filePart=null){
|
||||
function parseContent($fileName, & $callingObject, $filePart=null, $lineWise = false){
|
||||
$fileArray = file($fileName); /* File als Array einlesen */
|
||||
if($filePart != null){
|
||||
$fileArray = $this->_fetchFilePart(&$fileArray, $filePart); /* Wenn File aus mehreren Template-Teilen besteht, dann wird hir der relevante Zeil geholt */
|
||||
@@ -44,8 +46,13 @@ class Parser{
|
||||
$fileArray[$i] = preg_replace("/\{content:".$results[1][$j].":".$results[2][$j]."\}/i", $insert, $fileArray[$i]);
|
||||
}
|
||||
}
|
||||
if ($lineWise){
|
||||
$this->appendContent($fileArray[$i]);
|
||||
}
|
||||
}
|
||||
if (!$lineWise){
|
||||
$this->appendContent($fileArray);
|
||||
}
|
||||
$this->appendContent($fileArray);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user