Revision: 1349
http://adminer.svn.sourceforge.net/adminer/?rev=1349&view=rev
Author: jakubvrana
Date: 2010-03-23 16:03:34 +0000 (Tue, 23 Mar 2010)
Log Message:
-----------
Check function definition in drivers
Modified Paths:
--------------
branches/sqlite/compile.php
Modified: branches/sqlite/compile.php
===================================================================
--- branches/sqlite/compile.php 2010-03-19 13:57:20 UTC (rev 1348)
+++ branches/sqlite/compile.php 2010-03-23 16:03:34 UTC (rev 1349)
@@ -174,6 +174,22 @@
include dirname(__FILE__) . "/adminer/lang/$_SESSION[lang].inc.php";
}
+// check function definition in drivers
+$filename = dirname(__FILE__) . "/adminer/drivers/mysql.inc.php";
+preg_match_all('~\\bfunction ([^(]+)~', file_get_contents($filename), $matches); //! respect context (extension, class)
+$functions = array_combine($matches[1], $matches[0]);
+unset($functions["__destruct"], $functions["Min_DB"], $functions["Min_Result"]);
+foreach (glob(dirname(__FILE__) . "/adminer/drivers/" . ($driver ? $driver : "*") . ".inc.php") as $filename) {
+ if ($filename != "mysql.inc.php") {
+ $file = file_get_contents($filename);
+ foreach ($functions as $val) {
+ if (!strpos($file, "$val(")) {
+ echo "Missing $val in $filename\n";
+ }
+ }
+ }
+}
+
foreach (array("adminer", "editor") as $project) {
$lang_ids = array(); // global variable simplifies usage in a callback function
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|