Beispiel #1
0
 function iAddPageIDForDocumentPath($oP, $iNewID)
 {
     global $goApp;
     $oF = new WYFile($this->oDocumentsFilePath());
     $sFileContent = "\r\n" . $oP->sPath . "\t" . $iNewID;
     if (!$oF->bAppend($sFileContent)) {
         $sFileContent = $oF->sContent() . $sFileContent;
         $oF->setContent($sFileContent);
         if (!$oF->bWrite()) {
             $goApp->log("could not store new page iD " . $iNewID);
             $iNewID = 0;
         }
     }
     @$oF->chmod(0644);
     return $iNewID;
 }