Index: /mespace-global-local
===================================================================
--- /namespace-global-local (revision 1511)
+++  (revision )
@@ -1,162 +1,0 @@
-#!/usr/bin/php
-<?php
-# places real namespaces in use clauses, removes leading slashs in use statements
-# removes global classes from use clauses and adds leading backslash in code
-if(!isset($_SERVER['argv'][1]) || in_array($_SERVER['argv'][1], array('--help', '-h', '-?'))) {
-	help();
-	exit;
-}
-$dir = $_SERVER['argv'][1];
-$pattern = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] : '/\.php$/';
-
-$ite = new RecursiveDirectoryIterator($dir);
-foreach (new RecursiveIteratorIterator($ite) as $filename => $cur) {
-	if(preg_match($pattern, $filename)) {
-		updateFile($filename);
-	}
-}
-
-function updateFile($filename) {
-	$useblock = $block = array();
-	$updated = false;
-	foreach(file($filename) as $line) {
-		if(preg_match('/^use /', $line)) {
-			$useblock[] = $line;
-		} else {
-			if($useblock) {
-				$compare1 = implode("", $useblock);
-
-				// strip leading backslash
-				foreach($useblock as &$row) {
-					$row = preg_replace('/^use \\\/', 'use ', $row);
-				}
-
-				$compare2 = implode("", $useblock);
-				$updated = $updated || $compare1 !== $compare2;
-				$block = array_merge($block, $useblock);
-				$useblock = array();
-			}
-			$block[] = $line;
-		}
-	}
-	
-	echo $filename;
-	if($updated) {
-		file_put_contents($filename, implode("", $block));
-		echo "\tchanged\n";
-	} else {
-		echo "\tunchanged\n";
-	}
-}
-
-function help() {
-	echo "orders use clauses";
-	echo "\n";
-	echo "Usage: " . basename($_SERVER['argv'][0]) . " folder [--help]\n";
-	echo "\n";
-	echo "The options are as follows:\n";
-	echo "  -?, --help\n";
-	echo "    Show this help and exit.\n\n";
-}
-
-/**
- * 
- */
-class Tree {
-
-	/**
-	 * @var array
-	 */
-	protected $tree = array();
-
-	/**
-	 *
-	 * @param	$x		string
-	 * @return 			array
-	 */
-	protected function readConf($x) {
-		return explode('\\', $x);
-	}
-
-	/**
-	 * config as string
-	 * @param	$conf		string
-	 */
-	public function __construct(array $lines) {
-		$in = array_map(array($this, 'readConf'), $lines);
-		foreach($in as $row) {
-			$this->addIndex($this->tree, $row);
-		}
-	}
-	
-	protected function sort(&$out) {
-		// sort: directory first
-		$dir = $file = $keymap = array();
-		foreach(array_keys($out) as $i => $key) {
-			if(strpos($key, ';') !== false) {
-				$file[$i] = strtolower($key);
-			} else {
-				$dir[$i] = strtolower($key);
-			}
-			$keymap[$i] = $key;
-		}
-		// sort: alphabetical order
-		asort($dir);
-		asort($file);
-		$sort = array_merge(array_keys($dir), array_keys($file));
-
-		// link references
-		$copy = array();
-		foreach($sort as $i) {
-			$copy[$keymap[$i]] = $out[$keymap[$i]];
-		}
-		$out = $copy;
-	}
-
-	/**
-	 * recursive function
-	 */
-	protected function addIndex(&$out, $rows, $prefixtree = array(), $level = 0) {
-		if(!isset($rows[$level])) {
-			return;
-		}
-
-		$name = $rows[$level];
-		$prefixtree[] = $name;
-		if(!isset($out[$name])) {
-			$out[$name] = array();
-		}
-		if(count($rows) - 1 == $level) {
-			$old = $prefixtree;
-			$out[$name]['index'] = implode('\\', $prefixtree);
-		}
-
-		$this->sort($out);
-		$this->addIndex($out[$name], $rows, $prefixtree, $level + 1);
-	}
-
-	/**
-	 *
-	 */
-	public function getTree() {
-		return $this->tree;
-	}
-	
-	/**
-	 *
-	 */
-	public function getLines($tree = null, &$str = array()) {
-		if($tree === null) {
-			$tree = $this->tree;
-		}
-		foreach($tree as $val) {
-			if(is_array($val)) {
-				$this->getLines($val, $str);
-			}
-			else {
-				$str[] = $val;
-			}
-		}
-		return $str;
-	}
-}
Index: /mespace-use-order
===================================================================
--- /namespace-use-order (revision 1511)
+++  (revision )
@@ -1,159 +1,0 @@
-#!/usr/bin/php
-<?php
-# sorts namespace-use clauses in a directory way
-if(!isset($_SERVER['argv'][1]) || in_array($_SERVER['argv'][1], array('--help', '-h', '-?'))) {
-	help();
-	exit;
-}
-$dir = $_SERVER['argv'][1];
-$pattern = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] : '/\.php$/';
-
-$ite = new RecursiveDirectoryIterator($dir);
-foreach (new RecursiveIteratorIterator($ite) as $filename => $cur) {
-	if(preg_match($pattern, $filename)) {
-		updateFile($filename);
-	}
-}
-
-function updateFile($filename) {
-	$useblock = $block = array();
-	$updated = false;
-	foreach(file($filename) as $line) {
-		if(preg_match('/^use /', $line)) {
-			$useblock[] = $line;
-		} else {
-			if($useblock) {
-				$compare1 = implode("", $useblock);
-
-				$tree = new Tree($useblock);
-				$useblock = $tree->getLines();
-
-				$compare2 = implode("", $useblock);
-				$updated = $updated || $compare1 !== $compare2;
-				$block = array_merge($block, $useblock);
-				$useblock = array();
-			}
-			$block[] = $line;
-		}
-	}
-	
-	echo $filename;
-	if($updated) {
-		file_put_contents($filename, implode("", $block));
-		echo "\tchanged\n";
-	} else {
-		echo "\tunchanged\n";
-	}
-}
-
-function help() {
-	echo "orders use clauses";
-	echo "\n";
-	echo "Usage: " . basename($_SERVER['argv'][0]) . " folder [--help]\n";
-	echo "\n";
-	echo "The options are as follows:\n";
-	echo "  -?, --help\n";
-	echo "    Show this help and exit.\n\n";
-}
-
-/**
- * 
- */
-class Tree {
-
-	/**
-	 * @var array
-	 */
-	protected $tree = array();
-
-	/**
-	 *
-	 * @param	$x		string
-	 * @return 			array
-	 */
-	protected function readConf($x) {
-		return explode('\\', $x);
-	}
-
-	/**
-	 * config as string
-	 * @param	$conf		string
-	 */
-	public function __construct(array $lines) {
-		$in = array_map(array($this, 'readConf'), $lines);
-		foreach($in as $row) {
-			$this->addIndex($this->tree, $row);
-		}
-	}
-	
-	protected function sort(&$out) {
-		// sort: directory first
-		$dir = $file = $keymap = array();
-		foreach(array_keys($out) as $i => $key) {
-			if(strpos($key, ';') !== false) {
-				$file[$i] = strtolower($key);
-			} else {
-				$dir[$i] = strtolower($key);
-			}
-			$keymap[$i] = $key;
-		}
-		// sort: alphabetical order
-		natcasesort($dir);
-		natcasesort($file);
-		$sort = array_merge(array_keys($dir), array_keys($file));
-
-		// link references
-		$copy = array();
-		foreach($sort as $i) {
-			$copy[$keymap[$i]] = $out[$keymap[$i]];
-		}
-		$out = $copy;
-	}
-
-	/**
-	 * recursive function
-	 */
-	protected function addIndex(&$out, $rows, $prefixtree = array(), $level = 0) {
-		if(!isset($rows[$level])) {
-			return;
-		}
-
-		$name = $rows[$level];
-		$prefixtree[] = $name;
-		if(!isset($out[$name])) {
-			$out[$name] = array();
-		}
-		if(count($rows) - 1 == $level) {
-			$old = $prefixtree;
-			$out[$name]['index'] = implode('\\', $prefixtree);
-		}
-
-		$this->sort($out);
-		$this->addIndex($out[$name], $rows, $prefixtree, $level + 1);
-	}
-
-	/**
-	 *
-	 */
-	public function getTree() {
-		return $this->tree;
-	}
-	
-	/**
-	 *
-	 */
-	public function getLines($tree = null, &$str = array()) {
-		if($tree === null) {
-			$tree = $this->tree;
-		}
-		foreach($tree as $val) {
-			if(is_array($val)) {
-				$this->getLines($val, $str);
-			}
-			else {
-				$str[] = $val;
-			}
-		}
-		return $str;
-	}
-}
Index: /ke_package.sh
===================================================================
--- /make_package.sh (revision 1280)
+++  (revision )
@@ -1,228 +1,0 @@
-#!/bin/bash
-#
-# packages filesystem as wcf package
-# parameter 	(1) = directory (e.g. bbcode.google)
-#		(2) = version output (optional)
-#
-# by Torben Brodt
-
-cd $1
-
-# fetch packagename and version
-TITLE=`grep "<package name=" package.xml | cut -d '"' -f2`
-VERSION=`grep "<version>" package.xml | cut -d ">" -f2 | cut -d "<" -f1`
-FILENAME=`echo ${TITLE}.${VERSION}.tar.gz | sed "s/ //" | sed "s/ //"`
-
-# and assign date
-BUILDDATE=`date +"%Y-%m-%d"`
-TAR_STRING=""
-RECURSION=0
-
-# version output
-if [ $2 ]; then
-	if [ "$2" = "-v" ]; then
-		echo $FILENAME
-		exit
-	else
-		RECURSION=`expr $2 + 1`
-		if [ "$2" -lt "2" ]; then
-			echo "RECURSION = $RECURSION"
-		else
-			# recursion counter
-			echo "MAX_RECURSION = $RECURSION"
-			exit
-		fi
-	fi
-fi
-
-# welcome output
-echo ""
-echo ">>> $TITLE wird erstellt >>>>>>>>>>>>>>>>>"
-echo ""
-
-# create files.tar
-if [ -d "files" ]; then
-	TAR_STRING="$TAR_STRING files.tar"
-	cd files
-	tar cvf ../files.tar * --exclude=*/.svn*
-	cd ..
-fi
-
-# create pip.tar
-if [ -d "pip" ]; then
-	TAR_STRING="$TAR_STRING pip.tar"
-	cd pip
-	tar cvf ../pip.tar * --exclude=*/.svn*
-	cd ..
-fi
-
-# create templates.tar
-if [ -d "templates" ]; then
-	TAR_STRING="$TAR_STRING templates.tar"
-	cd templates
-	tar cvf ../templates.tar * --exclude=*/.svn*
-	cd ..
-fi
-
-# create acptemplates.tar
-if [ -d "acptemplates" ]; then
-	TAR_STRING="$TAR_STRING acptemplates.tar"
-	cd acptemplates
-	tar cvf ../acptemplates.tar * --exclude=*/.svn*
-	cd ..
-fi
-
-# create styles.tar
-if [ -d "styles" ]; then
-	TAR_STRING="$TAR_STRING styles/*"
-fi
-
-# package requirements
-if [ -d "requirements" ]; then
-	cd requirements
-	mkdir -p /tmp/${TITLE}/requirementsbackup
-	cp *.tar.gz /tmp/${TITLE}/requirementsbackup
-	dirs=`find . -mindepth 1 -maxdepth 1 -type d | grep -v .svn`
-	cd ..
-
-	for i in $dirs
-	do
-		PACKFILENAME=`sh ../make_package.sh requirements/$i -v`
-		sh ../make_package.sh requirements/$i $RECURSION
-		if [ -f "requirements/${PACKFILENAME}" ]; then
-			mv requirements/${PACKFILENAME} requirements/$i.tar.gz
-		else
-			# remove version from filename and place in right directory
-			mv ../${PACKFILENAME} requirements/$i.tar.gz
-		fi
-	done
-	TAR_STRING="$TAR_STRING requirements/*.tar*"
-fi
-
-# package optionals
-if [ -d "optionals" ]; then
-	cd optionals
-	mkdir -p /tmp/${TITLE}/optionalsbackup
-	cp *.tar.gz /tmp/${TITLE}/optionalsbackup
-	dirs=`find . -mindepth 1 -maxdepth 1 -type d | grep -v .svn`
-	cd ..
-
-	for i in $dirs
-	do
-		PACKFILENAME=`sh ../make_package.sh optionals/$i -v`
-		sh ../make_package.sh optionals/$i $RECURSION
-		if [ -f "optionals/${PACKFILENAME}" ]; then
-			mv optionals/${PACKFILENAME} optionals/$i.tar.gz
-		else
-			# remove version from filename and place in right directory
-			mv ../${PACKFILENAME} optionals/$i.tar.gz
-		fi
-	done
-	TAR_STRING="$TAR_STRING optionals/*.tar*"
-fi
-
-# replacements in language files
-#if [ -f "de.xml" ]; then
-	#mv de.xml de.tmp
-	#sed "s/VERSION/$VERSION/" de.tmp > de.xml
-#fi
-#if [ -f "en.xml" ]; then
-	#mv en.xml en.tmp
-	#sed "s/VERSION/$VERSION/" en.tmp > en.xml
-#fi
-#if [ -f "de-informal.xml" ]; then
-	#mv de-informal.xml de-informal.tmp
-	#sed "s/VERSION/$VERSION/" de-informal.tmp > de-informal.xml
-#fi
-#if [ -f "it.xml" ]; then
-	#mv it.xml it.tmp
-	#sed "s/VERSION/$VERSION/" it.tmp > it.xml
-#fi
-#if [ -f "hr.xml" ]; then
-	#mv hr.xml hr.tmp
-	#sed "s/VERSION/$VERSION/" hr.tmp > hr.xml
-#fi
-#if [ -f "fr.xml" ]; then
-	#mv fr.xml fr.tmp
-	#sed "s/VERSION/$VERSION/" fr.tmp > fr.xml
-#fi
-
-# replacements in package.xml
-mv package.xml package.tmp
-sed "s/DATE/$BUILDDATE/" package.tmp > package.xml
-
-# remove old package
-if [ -f "../${FILENAME}" ] ; then
-	rm ../${FILENAME}
-fi
-
-# append sql and diff files to package
-VARX=`find *.diff 2>/dev/null`
-if [ "$VARX" ]; then
-	TAR_STRING="$TAR_STRING *.diff"
-fi
-VARX=`find *.sql 2>/dev/null`
-if [ "$VARX" ]; then
-	TAR_STRING="$TAR_STRING *.sql"
-fi
-
-VARX=`find *_update.tar 2>/dev/null`
-if [ "$VARX" ]; then
-	TAR_STRING="$TAR_STRING *_update.tar"
-fi
-
-if [ -f "LICENSE" ]; then
-	TAR_STRING="$TAR_STRING LICENSE"
-fi
-
-# create new package
-tar cfz ${FILENAME} *.xml $TAR_STRING
-mv ${FILENAME} ..
-
-# rename back
-mv package.tmp package.xml
-#if [ -f "de.xml" ]; then
-#	mv de.tmp de.xml
-#fi
-#if [ -f "en.xml" ]; then
-#	mv en.tmp en.xml
-#fi
-#if [ -f "de-informal.xml" ]; then
-#	mv de-informal.tmp de-informal.xml
-#fi
-#if [ -f "it.xml" ]; then
-#	mv it.tmp it.xml
-#fi
-#if [ -f "fr.xml" ]; then
-#	mv fr.tmp fr.xml
-#fi
-#if [ -f "hr.xml" ]; then
-#	mv hr.tmp hr.xml
-#fi
-
-# remove tmp files
-if [ -f "files.tar" ]; then
-	rm files.tar
-fi
-if [ -f "acptemplates.tar" ]; then
-	rm acptemplates.tar
-fi
-if [ -f "templates.tar" ]; then
-	rm templates.tar
-fi
-if [ -f "pip.tar" ]; then
-	rm pip.tar
-fi
-if [ -d "optionals" ]; then
-	rm -f optionals/*.tar.gz
-	mv /tmp/${TITLE}/optionalsbackup/*.tar.gz optionals
-fi
-if [ -d "requirements" ]; then
-	rm -f requirements/*.tar.gz
-	mv /tmp/${TITLE}/requirementsbackup/*.tar.gz requirements
-fi
-
-echo ""
-echo "<<<<<<<<<<<<<<<< ${FILENAME} wurde erstellt <<<"
-echo "<<<<<<<<<<<<<<<< `date` <<<"
-echo ""
Index: /dex.php
===================================================================
--- /index.php (revision 922)
+++  (revision )
@@ -1,9 +1,0 @@
-<?php
-echo "<ul>";
-foreach(scandir('.') as $file) {
-	if(preg_match('/\.tar\.gz$/', $file)) {
-		echo '<li><a href="'.$file.'">'.$file.'</a> '.date('r',filemtime($file)).'</li>';
-	}
-}
-echo "</ul>";
-?>
Index: /ke_serverxml.py
===================================================================
--- /make_serverxml.py (revision 241)
+++  (revision )
@@ -1,72 +1,0 @@
-# -*- coding: utf8 -*-
-#!/usr/bin/python
-
-import os
-import xml.dom.minidom
-
-
-def dive(mydir="."):
-    "searchs for all package.xml files"
-    l = []
-    for filename in os.listdir(mydir):
-        subdir = mydir+"/"+filename
-        if os.path.isdir(subdir):
-            tmp = dive(subdir)
-            if len(tmp):
-                l.extend(tmp)
-        elif filename == "package.xml":
-            l.append(mydir)
-    return l
-
-
-class Package(object):
-    "representating a package"
-
-    def __init__(self, path):
-        "construcor gets path, opens package.xml and extracts the relevant information"
-        try:
-            dom = xml.dom.minidom.parse(path+"/package.xml").documentElement
-        except:
-            print path,"nicht wohlgeformt"
-        self.name = dom.getAttribute("name")
-        self.packageinformation = dom.getElementsByTagName("packageinformation")
-        self.authorinformation = dom.getElementsByTagName("authorinformation")
-        self.requiredpackages = dom.getElementsByTagName("requiredpackages")
-        self.instructions = dom.getElementsByTagName("instructions")
-
-    def toxml(self):
-        "returns a dom object"
-        dom = xml.dom.minidom.Document().createElement("package")
-        dom.setAttribute("name", self.name)
-        return dom
-
-    def __str__(self):
-        "returns packagename"
-        return self.name
-
-
-class Section(object):
-    "representating a section"
-
-    def __init__(self):
-        "constructor inits new dom object with root elements"
-        self.tree = xml.dom.minidom.Document()
-        self.packages = xml.dom.minidom.Document().createElement("packages")
-        self.tree.appendChild(self.packages)
-
-    def addPackage(self, package):
-        "adds a new package"
-        self.packages.appendChild(package.toxml())
-
-    def __str__(self):
-        "returns xml output in utf-8 encoding"
-        return self.tree.toprettyxml(encoding='utf-8')
-
-
-#main applikation
-s = Section()
-for path in dive():
-    dom = Package(path)
-    s.addPackage(dom)
-
-print s
Index: /date_files.sh
===================================================================
--- /update_files.sh (revision 854)
+++  (revision )
@@ -1,65 +1,0 @@
-#!/bin/bash
-#
-# copies package files to wbb directory
-# parameter 	(1) = directory (e.g. bbcode.google)
-#		(2) = destination directory (e.g. /var/www/wbb/wcf)
-#
-# by Torben Brodt
-
-cd $1
-
-# welcome output
-echo ""
-echo ">>> ${1} wird synchronisiert >>>>>>>>>>>>>>>>>"
-echo ""
-
-# create files.tar
-if [ -d "files" ]; then
-	cd files
-	find * ! \( -name '.*' -prune \) | cpio -pdmu $2
-	cd ..
-fi
-
-
-# create templates.tar
-if [ -d "templates" ]; then
-	cd templates
-	find * ! \( -name '.*' -prune \) | cpio -pdmu $2/templates/
-	cd ..
-fi
-
-# create acptemplates.tar
-if [ -d "acptemplates" ]; then
-	cd acptemplates
-	find * ! \( -name '.*' -prune \) | cpio -pdmu $2/acp/templates/
-	cd ..
-fi
-
-# package requirements
-if [ -d "requirements" ]; then
-	cd requirements
-	dirs=`find . -mindepth 1 -maxdepth 1 | grep -v .svn | grep -v tar.gz | sed "s/^\.\///"`
-	cd ..
-
-	for i in $dirs
-	do
-		sh ../update_files.sh requirements/$i $2
-	done
-fi
-
-# package optionals
-if [ -d "optionals" ]; then
-	cd optionals
-	dirs=`find . -mindepth 1 -maxdepth 1 | grep -v .svn | grep -v tar.gz | sed "s/^\.\///"`
-	cd ..
-
-	for i in $dirs
-	do
-		sh ../update_files.sh optionals/$i $2
-	done
-fi
-
-echo ""
-echo "<<<<<<<<<<<<<<<< ${1} wurde synchronisiert <<<"
-echo "<<<<<<<<<<<<<<<< `date` <<<"
-echo ""
Index: /mespace-unused
===================================================================
--- /namespace-unused (revision 1511)
+++  (revision )
@@ -1,83 +1,0 @@
-#!/usr/bin/php
-<?php
-# remove unused use statements
-if(!isset($_SERVER['argv'][1]) || in_array($_SERVER['argv'][1], array('--help', '-h', '-?'))) {
-	help();
-	exit;
-}
-$dir = $_SERVER['argv'][1];
-$pattern = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] : '/\.php$/';
-
-$ite = new RecursiveDirectoryIterator($dir);
-foreach (new RecursiveIteratorIterator($ite) as $filename => $cur) {
-	if(preg_match($pattern, $filename)) {
-		updateFile($filename);
-	}
-}
-
-function updateFile($filename) {
-	echo $filename;
-
-	$block = file($filename);
-	$regexp = $matches = array();
-	foreach($block as $i => $line) {
-		if(preg_match('/^use .*(?: |\\\)([a-zA-Z]+);$/', $line, $res)) {
-			$regexp[$i] = $res[1];
-			$matches[$res[1]] = array(
-				'line' => $i,
-				'hits' => 0
-			);
-		}
-	}
-	
-	// sort by length to avoid matching prefixes
-	if($regexp) {
-		$sortArray = $tmp = array();
-		foreach($regexp as $idx => $obj) {
-			$sortArray[$idx] = strlen($obj);
-			$tmp[$idx."x"] = $obj;
-		}
-
-		$regexp = array();
-		array_multisort($sortArray, SORT_DESC, $tmp);
-		foreach($tmp as $idx => $obj) {
-			$regexp[substr($idx, 0, -1)] = $obj;
-		}
-	}
-	
-	$hit = false;
-	if($matches) {
-		$regexp = '/('.implode("|", $regexp).')/';
-		preg_match_all($regexp, implode("", $block), $res);
-		if($res) {
-			foreach($res[1] as $className) {
-				$matches[$className]['hits']++;
-			}
-		}
-		
-		foreach($matches as $row) {
-			if($row['hits'] == 1) {
-				echo "\n\t- remove #".$row['line'].': '.$block[$row['line']];
-				unset($block[$row['line']]);
-				$hit = true;
-			}
-		}
-	}
-
-	if($hit) {
-		file_put_contents($filename, implode("", $block));
-		echo "\tchanged\n";
-	} else {
-		echo "\tunchanged\n";
-	}
-}
-
-function help() {
-	echo "removes unused use clauses";
-	echo "\n";
-	echo "Usage: " . basename($_SERVER['argv'][0]) . " folder [--help]\n";
-	echo "\n";
-	echo "The options are as follows:\n";
-	echo "  -?, --help\n";
-	echo "    Show this help and exit.\n\n";
-}
Index: /affolding.php
===================================================================
--- /scaffolding.php (revision 1192)
+++  (revision )
@@ -1,105 +1,0 @@
-<?php
-
-class Scaffolder {
-	protected $dir;
-
-	public function __construct($dir) {
-		$this->dir = $dir;
-	}
-	
-	public function run() {
-		$this->parseSQL($this->dir.'install.sql');
-	}
-	
-	/**
-	 * Deletes the comments from an sql file. 
-	 *
-	 * @param 	string 	$queries
-	 * @return	string	$queries
-	 */
-	public function deleteComments($queries) {
-//		$queries = preg_replace("~('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|(?:(?:--|#).*|/\*(?:.|[\r\n])*?\*/)~", '$1', $queries);
-		$queries = preg_replace("~('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|(?:(?:--|#)[^\n]*|/\*.*?\*/)~s", '$1', $queries);
-
-		// strip whitespace
-		return trim($queries);
-	}
-	
-	/**
-	 * This function reads the logable data out of the statement and 
-	 * calls the log function if so.  
-	 * 
-	 * @param	string		$filename
-	 */
-	protected function parseSQL($filename) {
-		$queries = file_get_contents($filename);
-	
-		$alterStatement = $columnName = $columns = array();
-
-		$queries = $this->deleteComments($queries);
-		// Put all queries in the $queries array. 
-		$queryArray = array();
-		$char = '';
-		$lastChar = '';
-		$inString = false;
-		$stringOpen = '';
-		for ($i = 0; $i < strlen($queries); $i++) {
-			$char = $queries[$i];
-
-			// if delimiter found, add the parsed part to the returned array
-			if ($char == ';' && !$inString) {
-				$queryArray[] = substr($queries, 0, $i);
-				$queries = substr($queries, $i + 1);
-				$i = 0;
-				$lastChar = '';
-			}
-			
-			else if (!$inString) {
-				if ($char == "'" || $char == '"') {
-					$inString = true;
-					$stringOpen = $char;
-				}
-			}
-			else if ($inString) {
-				if ($lastChar != '\\' && $char == $stringOpen) {
-					$inString = false;	
-				} 
-			}
-			$lastChar = $char;
-		}
-		if ($queries != '') {
-			$queryArray[] = $queries;
-		}
-		unset($queries);
-
-		// array for setup log data.
-		$tableLogData = array();
-		
-		// loop through the queries and handle them one by one
-		$c = count($queryArray);
-		for ($i = 0; $i < $c; $i++) {
-
-			// ignore errors syntax?
-			if (substr($queryArray[$i], 0, 1) == '@') {
-				$queryArray[$i] = substr($queryArray[$i], 1);
-			}
-			
-			// query for CREATE TABLE
-			$this->parseSingleSQL($queryArray[$i]);
-		}
-	}
-	
-	protected function parseSingleSQL($sql) {
-		// query for CREATE TABLE
-		if(preg_match("%CREATE(?:\s+TEMPORARY)?\s+TABLE(?:\s+IF\s+NOT\s+EXISTS)?\s+`?(\w+)`?(.*)%i", $sql, $matches)) {
-			$this->parseCreateTable($matches[1], $sql);
-		}
-	}
-	
-	protected function parseCreateTable($table, $sql) {
-		var_dump($table, $sql);
-	}
-}
-
-$scaff = new Scaffolder('/var/www/admanager/');
-$scaff->run();
