Added Composer to manage autoloads and HTMLPurifier and Smarty.

Install by doing (from htdocs):
$ curl -sS https://getcomposer.org/installer | php
$ ./composer.phar install

If you want to update autoloader:
$ ./composer.phar dumpautoload

Signed-off-by: Markus Birth <mbirth@gmail.com>
This commit is contained in:
2014-01-05 23:35:49 +01:00
parent 6343ffb540
commit f8a58c18a3
442 changed files with 138 additions and 37618 deletions

View File

@ -10,24 +10,8 @@
* TODO: accept-language des Browser auswerten
***************************************************************************/
function __autoload($class_name)
{
global $opt;
if (!preg_match('/^[\w]{1,}$/', $class_name))
return;
$file1 = $opt['rootpath'] . 'lib2/' . $class_name . '.class.php';
$file2 = $opt['rootpath'] . 'lib2/logic/' . $class_name . '.class.php';
$file3 = $opt['rootpath'] . 'libse/' . str_replace('_', '/', $class_name) . '.php';
if (file_exists($file1))
require_once($file1);
elseif (file_exists($file2))
require_once($file2);
elseif (file_exists($file3))
require_once($file3);
}
// load Composer autoloader, if not yet done
require_once dirname(__FILE__) . '/../vendor/autoload.php';
// check for broken browsers
$useragent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
@ -401,5 +385,3 @@ function number1000($n)
else
return str_replace(',', '.', number_format($n));
}
?>