]> git.mxchange.org Git - friendica.git/commitdiff
bug #104
authorFriendika <info@friendika.com>
Mon, 18 Jul 2011 04:34:02 +0000 (21:34 -0700)
committerFriendika <info@friendika.com>
Mon, 18 Jul 2011 04:34:02 +0000 (21:34 -0700)
boot.php
index.php

index af510a808b4442154ce75f17133afebeafd5d4de..001e3a540059ca6fd61e2a283f0e3730003c03c6 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1,9 +1,5 @@
 <?php
 
-set_time_limit(0);
-ini_set('pcre.backtrack_limit', 250000);
-
-
 define ( 'FRIENDIKA_VERSION',      '2.2.1044' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1075      );
@@ -179,20 +175,28 @@ define ( 'GRAVITY_COMMENT',      6);
  *
  */
 
-if (get_magic_quotes_gpc()) {
-    $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
-    while (list($key, $val) = each($process)) {
-        foreach ($val as $k => $v) {
-            unset($process[$key][$k]);
-            if (is_array($v)) {
-                $process[$key][stripslashes($k)] = $v;
-                $process[] = &$process[$key][stripslashes($k)];
-            } else {
-                $process[$key][stripslashes($k)] = stripslashes($v);
-            }
-        }
-    }
-    unset($process);
+function startup() {
+       error_reporting(E_ERROR | E_WARNING | E_PARSE);
+       set_time_limit(0);
+       ini_set('pcre.backtrack_limit', 250000);
+
+
+       if (get_magic_quotes_gpc()) {
+       $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
+           while (list($key, $val) = each($process)) {
+           foreach ($val as $k => $v) {
+                   unset($process[$key][$k]);
+               if (is_array($v)) {
+                       $process[$key][stripslashes($k)] = $v;
+                       $process[] = &$process[$key][stripslashes($k)];
+               } else {
+                       $process[$key][stripslashes($k)] = stripslashes($v);
+               }
+               }
+       }
+           unset($process);
+       }
+
 }
 
 /*
@@ -260,6 +264,8 @@ class App {
 
                $this->query_string = '';
 
+               startup();
+
                $this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']))      ?  'https' : 'http' );
 
                if(x($_SERVER,'SERVER_NAME')) {
index 2e24c5b015c3130fafba4d9df2ea5a51e449bc13..3e72baddc5a9d7ec278d9aa9b410da6e4e161564 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,7 +1,5 @@
 <?php
 
-error_reporting(E_ERROR | E_WARNING | E_PARSE);
-
 /**
  *
  * Friendika