Example #1
0
 function oPathForDocumentWithID($iID)
 {
     $oReturn = od_nil;
     $oP = WYDocument::oDocumentsFilePath();
     $oF = new WYFile($oP);
     if ($oF->bExists()) {
         $aLines = $oF->aContentLines();
     }
     foreach ($aLines as $sLine) {
         $dEntry = WYDocument::dParseDocumentsFileLine($sLine);
         if ($dEntry['id'] == $iID) {
             $oReturn = new WYPath($dEntry['path']);
         }
     }
     return $oReturn;
 }
Example #2
0
 function oEditedPagesPath()
 {
     global $goApp, $webyep_bOtherLoginsMayEditGlobalData;
     $oPath = od_nil;
     if ((int) $goApp->sFormFieldValue(WY_QK_EDITOR_GLOBAL) == 0 || $webyep_bOtherLoginsMayEditGlobalData || $goApp->bMainUser()) {
         $iPageID = (int) $goApp->sFormFieldValue(WY_QK_PAGEID);
         if ($iPageID) {
             $oPath = WYDocument::oPathForDocumentWithID($iPageID);
         }
     }
     return od_clone($oPath);
 }