Exemple #1
0
if (empty($SITEURL_REL)) {
    $SITEURL_REL = $SITEURL;
}
if (empty($ASSETURL)) {
    $ASSETURL = $SITEURL;
}
/**
 * Include other files depending if they are needed or not
 */
require_once GSADMININCPATH . 'cookie_functions.php';
require_once GSADMININCPATH . 'assets.php';
include_once GSADMININCPATH . 'plugin_functions.php';
// include core plugin for page caching, requires plugin functions for hooks
// @todo must stay after plugin_function for now, since it requires plugin_functions
include_once GSADMININCPATH . 'caching_functions.php';
init_pageCache();
if ($SAFEMODE) {
    if (isset($_REQUEST['safemodeoff']) && is_logged_in()) {
        disableSafeMode();
        redirect(myself(false));
    } else {
        $SAFEMODE = true;
        debugLog("SAFEMODE ON");
        $load['plugin'] = false;
        loadPluginData();
    }
}
// load plugins functions
if (isset($load['plugin']) && $load['plugin']) {
    if (function_exists('plugin_preload_callout')) {
        plugin_preload_callout();
/**
 * LEGACY
 * Get Cached Pages XML File Values
 *
 * Populates $pagesArray from page cache file
 * If the file does not exist it is created
 * @todo refresh does nothing
 * 
 * @since 3.1
 * @param bool $refresh check cache for pages changes and regen
 *  
 */
function getPagesXmlValues($refresh = false)
{
    global $pagesArray;
    if (!$pagesArray) {
        init_pageCache($refresh);
    }
    return $pagesArray;
}
Exemple #3
0
$counter = '0';
$table = '';
// cloning a page
if (isset($_GET['action']) && isset($_GET['id']) && $_GET['action'] == 'clone') {
    check_for_csrf("clone", "pages.php");
    $status = clone_page($_GET['id']);
    if ($status !== false) {
        exec_action('page-clone');
        // @hook page-clone page was cloned
        redirect('pages.php?upd=clone-success&id=' . $status);
    } else {
        $error = sprintf(i18n_r('CLONE_ERROR'), var_out($_GET['id']));
        redirect('pages.php?error=' . $error);
    }
}
init_pageCache(true);
getPagesXmlValues(true);
/**
 * sorting prepare function tests
 * @todo
 */
/**
 * prepare pubDate strtotime it
 */
function prepare_pubDate($page, $key)
{
    return strtotime($key);
}
/**
 * sort by menuOrder
 * menu order=0 or ""  or menuStatus=Y are lowest priority