added autoloading, configurable paste size limit, changed JS to calculate localized comment times instead of UTC

This commit is contained in:
Simon Rupf
2012-04-30 22:58:08 +02:00
parent 5d6401b44d
commit edf95ff56d
14 changed files with 207 additions and 91 deletions

35
lib/auto.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* ZeroBin
*
* a zero-knowledge paste bin
*
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
* @version 0.15
*/
spl_autoload_register('auto::loader');
/**
* auto
*
* provides autoloading functionality
*/
class auto
{
/**
* strips slashes deeply
*
* @access public
* @static
* @param mixed $value
* @return mixed
*/
public static function loader($class_name)
{
require_once PATH . 'lib/' . str_replace('_', '/', $class_name) . '.php';
}
}