backport: don't try setting time limit in non-safe mode
authorchriskl <chriskl>
Fri, 4 Mar 2005 02:32:44 +0000 (02:32 +0000)
committerchriskl <chriskl>
Fri, 4 Mar 2005 02:32:44 +0000 (02:32 +0000)
dataexport.php
dataimport.php
dbexport.php
display.php
sql.php

index 429e2ef752f6036302cd034b113a263e1e7d990f..f6adacd6e88144ac4bb1c36f7b575ab0e3878bea 100644 (file)
@@ -4,7 +4,7 @@
         * Does an export to the screen or as a download.  This checks to
         * see if they have pg_dump set up, and will use it if possible.
         *
-        * $Id: dataexport.php,v 1.17.2.1 2005/02/09 11:31:49 chriskl Exp $
+        * $Id: dataexport.php,v 1.17.2.2 2005/03/04 02:32:44 chriskl Exp $
         */
 
        $extensions = array(
@@ -16,8 +16,9 @@
                'xml' => 'xml'
        );
 
-      // Prevent timeouts on large exports
-      set_time_limit(0);
+       // Prevent timeouts
+       if (!ini_get('safe_mode')) set_time_limit(0);
+
        // if (!isset($_REQUEST['table']) && !isset($_REQUEST['query']))
        // What must we do in this case? Maybe redirect to the homepage?
 
index 998bc24de8e7629540435b1be08c538a95835b32..43a7516b768086f2d6dfeea7daf9eb4ecd83bd34 100644 (file)
@@ -3,11 +3,12 @@
        /**
         * Does an import to a particular table from a text file
         *
-        * $Id: dataimport.php,v 1.6.2.1 2005/02/09 11:31:49 chriskl Exp $
+        * $Id: dataimport.php,v 1.6.2.2 2005/03/04 02:32:44 chriskl Exp $
         */
 
-      // Prevent timeouts on large imports
-      set_time_limit(0);
+       // Prevent timeouts
+       if (!ini_get('safe_mode')) set_time_limit(0);
+
        // Include application functions
        include_once('./libraries/lib.inc.php');
 
index d15199311eac869cf83739535f8e406da3e10eaa..da96fc94c7763e04e722f8284928b32650ad8ba6 100644 (file)
@@ -3,11 +3,12 @@
         * Does an export of a database or a table (via pg_dump)
         * to the screen or as a download.
         *
-        * $Id: dbexport.php,v 1.14.2.4 2005/02/24 09:57:44 chriskl Exp $
+        * $Id: dbexport.php,v 1.14.2.5 2005/03/04 02:32:44 chriskl Exp $
         */
 
-      // Prevent timeouts on large exports
-      set_time_limit(0);
+       // Prevent timeouts
+       if (!ini_get('safe_mode')) set_time_limit(0);
+
        // Include application functions
        $_no_output = true;
        include_once('./libraries/lib.inc.php');
index a1f0bdb448bb96b83972812b22b20470fb256f62..2ac45d6c1bebf17babddeac8872e9ce5b0cdb88b 100644 (file)
@@ -9,11 +9,12 @@
         * @param $return_desc The return link name
         * @param $page The current page
         *
-        * $Id: display.php,v 1.46.2.1 2005/02/09 11:31:49 chriskl Exp $
+        * $Id: display.php,v 1.46.2.2 2005/03/04 02:32:44 chriskl Exp $
         */
 
-      // Prevent timeouts on large result sets
-      set_time_limit(0);
+       // Prevent timeouts
+       if (!ini_get('safe_mode')) set_time_limit(0);
+
        // Include application functions
        include_once('./libraries/lib.inc.php');
 
diff --git a/sql.php b/sql.php
index 093c1529866a764f3bba9d3a63df8874efa2d11e..0cf4c2b652cd4b2457cf23ee7c416a041c054e1f 100644 (file)
--- a/sql.php
+++ b/sql.php
@@ -6,11 +6,12 @@
         * how many SQL statements have been strung together with semi-colons
         * @param $query The SQL query string to execute
         *
-        * $Id: sql.php,v 1.26.2.1 2005/02/09 11:31:49 chriskl Exp $
+        * $Id: sql.php,v 1.26.2.2 2005/03/04 02:32:45 chriskl Exp $
         */
 
-      // Prevent timeouts on large SQL sets
-      set_time_limit(0);
+       // Prevent timeouts on large exports (non-safe mode only)
+       if (!ini_get('safe_mode')) set_time_limit(0);
+
        // Include application functions
        include_once('./libraries/lib.inc.php');