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; }
function save() { global $goApp; $oP =& $this->oDataFilePath(true, false); $oF = new WYFile($oP); $oF->setContent(serialize($this->dContent)); if (!$oF->bWrite()) { $goApp->log("could not write element data to " . $oP->sPath); $goApp->setDataAccessProblem(true); } @$oF->chmod(0644); }