Exemplo n.º 1
0
N_DEBUGTYPE_PAGE  =   4 = Page debugging
N_DEBUGTYPE_CACHE =   8 = Cache handling
N_DEBUGTYPE_MENU  =  16 = Menu debugging
N_DEBUGTYPE_AUTH  =  32 = Auth/Login debugging
N_DEBUGTYPE_SQL   =  64 = SQL debugging
N_DEBUGTYPE_ALL   = 127 = ALL options
*/
define('DEBUG_TYPE', 127);
define('PAGE_CACHING', true);
define('TREE_CACHING', true);
// Set this to true if your navigation is actually in the body of each page.
// That way, caches are cleared when you make changes to pages to keep your site
// consistent. This should probably be set to false on a high traffic site.
define('NAV_IN_PAGE', true);
// Cache lifetime for files in seconds
define('JS_CACHE_LIFETIME', -1);
// Backend config is now loaded
require_once 'config/config.php';
// To customize which pages cannot be deleted, add their page id's here
NConfig::$protectedPages = array(1, 4);
// Set the upload handler
NUpload::connect(getenv('UPLOAD_HANDLER'));
// Sanity check for configuration
array_map(function ($env) {
    if (getenv($env) === false) {
        error_reporting(0);
        $error = "{$env} not configured!";
        echo $error;
        throw new Exception($error);
    }
}, array('DB_TYPE', 'DB_SERVER_USERNAME', 'DB_SERVER_PASSWORD', 'DB_SERVER', 'DB_DATABASE'));