Esempio n. 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;
 }
Esempio n. 2
0
 function sMD5()
 {
     $oP =& $this->oPath();
     $oF = new WYFile($oP);
     $sC = $oF->sContent();
     return md5($sC);
 }
Esempio n. 3
0
 function _loadContent()
 {
     global $goApp, $webyep_oCurrentLoop, $webyep_sLiveDemoSlotID;
     $oP = od_nil;
     $oF = od_nil;
     $iDelLoopID = 0;
     if ($this->bUseLoopID() && $webyep_oCurrentLoop != od_nil && ($iDelLoopID = $webyep_oCurrentLoop->iDeletedLoopInstance()) != 0) {
         $iCurrentLoopID = $goApp->oDocument->iLoopID();
         $goApp->oDocument->setLoopID($iDelLoopID);
         $oP =& $this->oDataFilePath($goApp->bEditMode, false);
         if ($oP && $oP->bExists()) {
             $oF = new WYFile($oP);
             $this->dContent = unserialize($oF->sContent());
             $this->deleteContent();
             // $this->save();
             $oF->bDelete();
         }
         $goApp->oDocument->setLoopID($iCurrentLoopID);
     }
     $oP =& $this->oDataFilePath($goApp->bEditMode, true);
     if ($oP && $oP->bExists()) {
         $oF = new WYFile($oP);
         $this->dContent = unserialize($oF->sContent());
     } else {
         $this->dContent = array();
     }
 }