/** * This is a placeholder for future development. * * @param string content-type; override for RSS feeds * @param integer seconds */ function headers_content_mightcache($type = 'text/html', $max_age = '#', $charset = '#') { global $Messages, $is_admin_page; global $PageCache, $Debuglog; header_content_type($type, $charset); if (empty($max_age) || $is_admin_page || is_logged_in() || $Messages->count()) { // Don't cache if no max_age given // + NEVER EVER allow admin pages to cache // + NEVER EVER allow logged in data to be cached // + NEVER EVER allow transactional Messages to be cached!: header_nocache(); // Check server caching too, but note that this is a different caching process then caching on the client // It's important that this is a double security check only and server caching should be prevented before this // If something should not be cached on the client, it should never be cached on the server either if (!empty($PageCache)) { // Abort PageCache collect $Debuglog->add('Abort server caching in headers_content_mightcache() function. This should have been prevented!'); $PageCache->abort_collect(); } return; } // If we are on a "normal" page, we may, under some circumstances, tell the browser it can cache the data. // This MAY be extremely confusing though, every time a user logs in and gets back to a screen with no evobar! // This cannot be enabled by default and requires admin switches. // For feeds, it is a little bit less confusing. We might want to have the param enabled by default in that case. // WARNING: extra special care needs to be taken before ever caching a blog page that might contain a form or a comment preview // having user details cached would be extremely bad. // in the meantime... header_nocache(); }
/** * Template tag. Output content-type header * For backward compatibility * * @see skin_content_meta() * * @param string content-type; override for RSS feeds */ function skin_content_header($type = 'text/html') { header_content_type($type); }
* * @package evocore */ /** * Do the MAIN initializations: */ require_once dirname(__FILE__) . '/../conf/_config.php'; require_once $inc_path . '_main.inc.php'; load_funcs('../inc/skins/_skin.funcs.php'); global $skins_path, $ads_current_skin_path, $disp, $ctrl; param('action', 'string', ''); $item_ID = param('p', 'integer'); $blog_ID = param('blog', 'integer'); // Make sure the async responses are never cached: header_nocache(); header_content_type('text/html', $io_charset); // Save current debug values $current_debug = $debug; $current_debug_jslog = $debug_jslog; // Do not append Debuglog to response! $debug = false; // Do not append Debug JSlog to response! $debug_jslog = false; // Init AJAX log $Ajaxlog = new Log(); $Ajaxlog->add(sprintf('action: %s', $action), 'note'); $params = param('params', 'array', array()); switch ($action) { case 'get_comment_form': // display comment form $ItemCache =& get_ItemCache();
echo 'Invalid option "' . $v . '". Use "-h" or "--help" for a list of options.' . "\n"; die(1); } } } global $default_locale, $current_charset; // We don't load _init_session.inc.php in CLI mode, so we set locale and DB connection charset here locale_overwritefromDB(); locale_activate($default_locale); // Init charset handling - this will also set the encoding for MySQL connection init_charsets($current_charset); } else { // This is a web request: (for testing purposes only. Not designed for production) // Make sure the response is never cached: header_nocache(); header_content_type(); // Add CSS: require_css('basic_styles.css', 'rsc_url'); // the REAL basic styles require_css('basic.css', 'rsc_url'); // Basic styles ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Cron exec</title> <?php include_headlines(); ?> </head> <body>