summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/css.php15
-rw-r--r--lib/exe/indexer.php14
-rw-r--r--lib/exe/js.php2
3 files changed, 12 insertions, 19 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php
index 73502f055..cb689d015 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -32,15 +32,10 @@ if(!defined('SIMPLE_TEST')){
function css_out(){
global $conf;
global $lang;
- switch ($_REQUEST['s']) {
- case 'all':
- case 'print':
- case 'feed':
- $style = $_REQUEST['s'];
- break;
- default:
- $style = '';
- break;
+ $style = '';
+ if (isset($_REQUEST['s']) &&
+ in_array($_REQUEST['s'], array('all', 'print', 'feed'))) {
+ $style = $_REQUEST['s'];
}
$tpl = trim(preg_replace('/[^\w-]+/','',$_REQUEST['t']));
@@ -152,7 +147,7 @@ function css_out(){
function css_cacheok($cache,$files,$tplinc){
global $config_cascade;
- if($_REQUEST['purge']) return false; //support purge request
+ if(isset($_REQUEST['purge'])) return false; //support purge request
$ctime = @filemtime($cache);
if(!$ctime) return false; //There is no cache
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index b83a9ac60..1c4128eb7 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -20,20 +20,18 @@ define('INDEXER_VERSION', 2);
@ignore_user_abort(true);
// check if user abort worked, if yes send output early
-if(@ignore_user_abort() && !$conf['broken_iua']){
+$defer = !@ignore_user_abort() || $conf['broken_iua'];
+if(!$defer){
sendGIF(); // send gif
- $defer = false;
-}else{
- $defer = true;
}
$ID = cleanID($_REQUEST['id']);
// Catch any possible output (e.g. errors)
-if(!$_REQUEST['debug']) ob_start();
+if(!isset($_REQUEST['debug'])) ob_start();
// run one of the jobs
-$tmp = array();
+$tmp = array(); // No event data
$evt = new Doku_Event('INDEXER_TASKS_RUN', $tmp);
if ($evt->advise_before()) {
runIndexer() or
@@ -45,7 +43,7 @@ if ($evt->advise_before()) {
}
if($defer) sendGIF();
-if(!$_REQUEST['debug']) ob_end_clean();
+if(!isset($_REQUEST['debug'])) ob_end_clean();
exit;
// --------------------------------------------------------------------
@@ -358,7 +356,7 @@ function date_iso8601($int_date) {
* @author Harry Fuecks <fuecks@gmail.com>
*/
function sendGIF(){
- if($_REQUEST['debug']){
+ if(isset($_REQUEST['debug'])){
header('Content-Type: text/plain');
return;
}
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 24a2e5a2c..0888fa57f 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -179,7 +179,7 @@ function js_load($file){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function js_cacheok($cache,$files){
- if($_REQUEST['purge']) return false; //support purge request
+ if(isset($_REQUEST['purge'])) return false; //support purge request
$ctime = @filemtime($cache);
if(!$ctime) return false; //There is no cache