/**
  * Retourne l'URL publique d'une page
  *
  * @param string $sLanguage
  * @return string
  */
 public function getPageUrl($sLanguage = null)
 {
     return pagesHelpers::getPageUrl($this->slug, $sLanguage);
 }
Exemple #2
0
            }
        }
        # Images
        if ($okt->pages->config->images['enable']) {
            $aPageData['images'] = $rsPage->getImagesInfo();
        }
        # Fichiers
        if ($okt->pages->config->files['enable']) {
            $aPageData['files'] = $rsPage->getFilesInfo();
        }
        # Permissions
        if ($okt->pages->canUsePerms()) {
            $aPageData['perms'] = $okt->pages->getPagePermissions($aPageData['post']['id']);
        }
        # URL
        $sPageUrl = pagesHelpers::getPageUrl($aPageData['locales'][$okt->user->language]['slug']);
    }
}
# -- TRIGGER MODULE PAGES : adminPostInit
$okt->pages->triggers->callTrigger('adminPostInit', $okt, $aPageData, $rsPage, $rsPageI18n);
/* Traitements
----------------------------------------------------------*/
# switch page status
if (!empty($_GET['switch_status']) && !empty($aPageData['post']['id'])) {
    try {
        $okt->pages->switchPageStatus($aPageData['post']['id']);
        # log admin
        $okt->logAdmin->info(array('code' => 32, 'component' => 'pages', 'message' => 'page #' . $aPageData['post']['id']));
        $okt->redirect('module.php?m=pages&action=edit&post_id=' . $aPageData['post']['id'] . '&switched=1');
    } catch (Exception $e) {
        $okt->error->set($e->getMessage());