Permalink
Browse files

Fix logic for ?text=(0|1|)

  • Loading branch information...
relrod committed Mar 24, 2012
1 parent bb4943b commit 454695e68402576615c48386bbc623a23dd0c547
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/resources/global_resources.php
@@ -37,8 +37,11 @@ function is_text_useragent() {
$_SERVER['HTTP_USER_AGENT']);
} else {
- // Force text useragent response to be off...
- if (request_or_default('text')) {
+ // Force text useragent response to be on/off...
+ $force_text = request_or_default('text');
+ if ($force_text != 0 || $force_text == null) {
+ return true;
+ } else {
return false;
}
@@ -48,7 +51,7 @@ function is_text_useragent() {
}
}
-function debug($title, $text=null) {
+function debug($title, $text = null) {
$debug = DaGdConfig::get('general.debug');
if ($debug) {
echo '<h5>'.$title.'</h5>';
@@ -104,4 +107,4 @@ function build_given_querystring() {
}
return rtrim($querystring, '&');
-}
+}

0 comments on commit 454695e

Please sign in to comment.