[Mapbender-commits] r2641 - branches/spsneo_dev/mapbender/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jul 10 03:39:18 EDT 2008


Author: spsneo
Date: 2008-07-10 03:39:17 -0400 (Thu, 10 Jul 2008)
New Revision: 2641

Added:
   branches/spsneo_dev/mapbender/update/commandLine.inc
Log:
Database Update Routine ready

Added: branches/spsneo_dev/mapbender/update/commandLine.inc
===================================================================
--- branches/spsneo_dev/mapbender/update/commandLine.inc	                        (rev 0)
+++ branches/spsneo_dev/mapbender/update/commandLine.inc	2008-07-10 07:39:17 UTC (rev 2641)
@@ -0,0 +1,22 @@
+<?php
+
+#Mapbender Updater File
+#@author Siddharth Prakash Singh (spsneo)
+#Google SoC 2008 Project
+# This file tests whether the update script has been called from command line or browser.
+# Aborts the update process if called from a web browser
+
+
+if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
+	echo "This script must be executed from the command line ";
+	exit();
+}
+
+if(PHP_SAPI != 'cli') {
+echo "This script must be executed from the command line.";
+exit();
+}
+
+#Set the execution time to infinity
+ at set_time_limit( 0 );
+?>



More information about the Mapbender_commits mailing list