コード例 #1
0
 /**
  * Return fake-ID "root" if no ID is found (needed to upload files into the root-folder)
  */
 public function currentPageID()
 {
     return ($result = parent::currentPageID()) === null ? 0 : $result;
 }
コード例 #2
0
ファイル: CMSMain.php プロジェクト: hemant-chakka/awss
 public function currentPageID()
 {
     $id = parent::currentPageID();
     $this->extend('updateCurrentPageID', $id);
     // Fall back to homepage record
     if (!$id) {
         $homepageSegment = RootURLController::get_homepage_link();
         $homepageRecord = DataObject::get_one('SiteTree', sprintf('"SiteTree"."URLSegment" = \'%s\'', Convert::raw2sql($homepageSegment)));
         if ($homepageRecord) {
             $id = $homepageRecord->ID;
         }
     }
     return $id;
 }
コード例 #3
0
 public function currentPageID()
 {
     $id = parent::currentPageID();
     $this->extend('updateCurrentPageID', $id);
     return $id;
 }
コード例 #4
0
ファイル: CMSMain.php プロジェクト: prostart/cobblestonepath
 public function currentPageID()
 {
     $id = parent::currentPageID();
     // Fall back to homepage record
     if (!$id) {
         $homepageSegment = RootURLController::get_homepage_link();
         $homepageRecord = DataObject::get_one('SiteTree', sprintf('"URLSegment" = \'%s\'', $homepageSegment));
         if ($homepageRecord) {
             $id = $homepageRecord->ID;
         }
     }
     return $id;
 }
コード例 #5
0
 function currentPageID()
 {
     $id = parent::currentPageID();
     $reports = SS_Report::get_reports('ReportAdmin');
     return isset($reports[$id]) ? $reports[$id] : null;
 }