mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-03 03:37:52 +02:00
@@ -15,7 +15,6 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Main engine defines
|
// Main engine defines
|
||||||
define('DS', DIRECTORY_SEPARATOR);
|
define('DS', DIRECTORY_SEPARATOR);
|
||||||
define('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\/'));
|
define('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\/'));
|
||||||
|
@@ -100,7 +100,7 @@
|
|||||||
<span style="border-top:1px solid #E0E0E0; padding-top:10px;">
|
<span style="border-top:1px solid #E0E0E0; padding-top:10px;">
|
||||||
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
|
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
|
||||||
<a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a> /
|
<a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a> /
|
||||||
© 2012 <a href="http://monstra.org" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
|
© 2012 - 2013 <a href="http://monstra.org" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
@@ -90,7 +90,6 @@ class ClassLoader
|
|||||||
public static function directory($path)
|
public static function directory($path)
|
||||||
{
|
{
|
||||||
static::$directories[] = rtrim($path, '/');
|
static::$directories[] = rtrim($path, '/');
|
||||||
echo rtrim($path, '/');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -160,28 +159,27 @@ class ClassLoader
|
|||||||
public static function load($className)
|
public static function load($className)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
|
||||||
var_dump(static::$classes);
|
|
||||||
die();
|
|
||||||
*/
|
|
||||||
$className = ltrim($className, '\\');
|
$className = ltrim($className, '\\');
|
||||||
|
|
||||||
// Try to autoload an aliased class
|
/**
|
||||||
|
* Try to autoload an aliased class
|
||||||
|
*/
|
||||||
if (isset(static::$aliases[$className])) {
|
if (isset(static::$aliases[$className])) {
|
||||||
return class_alias(static::$aliases[$className], $className);
|
return class_alias(static::$aliases[$className], $className);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to load a mapped class
|
/**
|
||||||
|
* Try to load a mapped class
|
||||||
|
*/
|
||||||
if (isset(static::$classes[$className]) && file_exists(static::$classes[$className])) {
|
if (isset(static::$classes[$className]) && file_exists(static::$classes[$className])) {
|
||||||
include static::$classes[$className];
|
include static::$classes[$className];
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to load class from a registered namespace
|
/**
|
||||||
|
* Try to load class from a registered namespace
|
||||||
|
*/
|
||||||
foreach (static::$namespaces as $namespace => $path) {
|
foreach (static::$namespaces as $namespace => $path) {
|
||||||
if (strpos($className, $namespace) === 0) {
|
if (strpos($className, $namespace) === 0) {
|
||||||
if (static::loadPSR0(substr($className, strlen($namespace)), $path)) {
|
if (static::loadPSR0(substr($className, strlen($namespace)), $path)) {
|
||||||
@@ -190,8 +188,10 @@ class ClassLoader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to load a PSR-0 compatible class
|
/**
|
||||||
// The second call to the loadPSR0 method is used to autoload legacy code
|
* Try to load a PSR-0 compatible class
|
||||||
|
* The second call to the loadPSR0 method is used to autoload legacy code
|
||||||
|
*/
|
||||||
if (static::loadPSR0($className) || static::loadPSR0(strtolower($className))) {
|
if (static::loadPSR0($className) || static::loadPSR0(strtolower($className))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -242,7 +242,7 @@ class ErrorHandler
|
|||||||
$error['type'] = get_class($exception);
|
$error['type'] = get_class($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write to error log
|
// @todo Write to error log
|
||||||
|
|
||||||
/*if () {
|
/*if () {
|
||||||
Write here
|
Write here
|
||||||
@@ -251,7 +251,7 @@ class ErrorHandler
|
|||||||
// Send headers and output
|
// Send headers and output
|
||||||
@header('Content-Type: text/html; charset=UTF-8');
|
@header('Content-Type: text/html; charset=UTF-8');
|
||||||
|
|
||||||
if (GELATO_DISPLAY_ERRORS) {
|
if (GELATO_DISPLAY_ERRORS) {
|
||||||
$error['backtrace'] = $exception->getTrace();
|
$error['backtrace'] = $exception->getTrace();
|
||||||
|
|
||||||
if ($exception instanceof ErrorException) {
|
if ($exception instanceof ErrorException) {
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Error</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
* { margin: 0; padding: 0; }
|
* { margin: 0; padding: 0; }
|
||||||
#gelato-error
|
#gelato-error
|
||||||
@@ -223,3 +228,5 @@ function toggle(id, link)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -1,69 +1,65 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="">
|
<meta charset="utf-8">
|
||||||
<title>Error</title>
|
<title>Error</title>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
body
|
body
|
||||||
{
|
{
|
||||||
height:100%;
|
height:100%;
|
||||||
background:#eee;
|
background:#eee;
|
||||||
padding:0px;
|
padding:0px;
|
||||||
margin:0px;
|
margin:0px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
color:#333;
|
color:#333;
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
line-height: 100%;
|
line-height: 100%;
|
||||||
}
|
}
|
||||||
a
|
a
|
||||||
{
|
{
|
||||||
color:#0088cc;
|
color:#0088cc;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
a:hover
|
a:hover
|
||||||
{
|
{
|
||||||
color:#005580;
|
color:#005580;
|
||||||
text-decoration:underline;
|
text-decoration:underline;
|
||||||
}
|
}
|
||||||
h1
|
h1
|
||||||
{
|
{
|
||||||
font-size: 4em;
|
font-size: 4em;
|
||||||
}
|
}
|
||||||
small
|
small
|
||||||
{
|
{
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
hr
|
hr
|
||||||
{
|
{
|
||||||
border:0px;
|
border:0px;
|
||||||
border-bottom:1px #ddd solid;
|
border-bottom:1px #ddd solid;
|
||||||
}
|
}
|
||||||
#message
|
#message
|
||||||
{
|
{
|
||||||
width: 700px;
|
width: 700px;
|
||||||
margin: 15% auto;
|
margin: 15% auto;
|
||||||
}
|
}
|
||||||
#back-home
|
#back-home
|
||||||
{
|
{
|
||||||
bottom:0px;
|
bottom:0px;
|
||||||
right:0px;
|
right:0px;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="message">
|
<div id="message">
|
||||||
<h1>Error</h1>
|
<h1>Error</h1>
|
||||||
<hr>
|
<hr>
|
||||||
<p>Aw, snap! An error has occurred while processing your request.</p>
|
<p>Aw, snap! An error has occurred while processing your request.</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@@ -14,6 +14,7 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Valid
|
class Valid
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @package Monstra
|
* @package Monstra
|
||||||
* @subpackage Plugins
|
* @subpackage Plugins
|
||||||
* @author Romanenko Sergey / Awilum
|
* @author Romanenko Sergey / Awilum
|
||||||
* @copyright 2012 Romanenko Sergey / Awilum
|
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user