X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=extlib%2FDB%2FDataObject%2FcreateTables.php;h=1295d252b88e4328b54a3e515421dcdb8f9e2923;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=c0659574eaaf66aefa85f6d5182fa2060d8a933d;hpb=14c9366aac697e87499c5748b36fa7bf5e6cd320;p=quix0rs-gnu-social.git diff --git a/extlib/DB/DataObject/createTables.php b/extlib/DB/DataObject/createTables.php old mode 100755 new mode 100644 index c0659574ea..1295d252b8 --- a/extlib/DB/DataObject/createTables.php +++ b/extlib/DB/DataObject/createTables.php @@ -16,7 +16,7 @@ // | Author: Alan Knowles // +----------------------------------------------------------------------+ // -// $Id: createTables.php,v 1.24 2006/01/13 01:27:55 alan_k Exp $ +// $Id: createTables.php 277015 2009-03-12 05:51:03Z alan_k $ // // since this version doesnt use overload, @@ -27,13 +27,17 @@ define('DB_DATAOBJECT_NO_OVERLOAD',1); //require_once 'DB/DataObject/Generator.php'; require_once 'DB/DataObject/Generator.php'; +if (php_sapi_name() != 'cli') { + PEAR::raiseError("\nERROR: You must turn use the cli sapi to run this", null, PEAR_ERROR_DIE); +} + if (!ini_get('register_argc_argv')) { PEAR::raiseError("\nERROR: You must turn register_argc_argv On in you php.ini file for this to work\neg.\n\nregister_argc_argv = On\n\n", null, PEAR_ERROR_DIE); exit; } if (!@$_SERVER['argv'][1]) { - PEAR::raiseError("\nERROR: createTable.php usage:\n\nC:\php\pear\DB\DataObjects\createTable.php example.ini\n\n", null, PEAR_ERROR_DIE); + PEAR::raiseError("\nERROR: createTable.php usage:\n\n" .$_SERVER['argv'][0] . " example.ini\n\n", null, PEAR_ERROR_DIE); exit; }