Skip to content

Commit

Permalink
Improved the Autoload class
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Nov 12, 2016
1 parent a40ae4f commit c7890ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions system/classes/Autoload.php
Expand Up @@ -25,6 +25,10 @@ public static function load($className)
self::initialize();
}

if (class_exists($className, false)) {
return;
}

if (strpos($className, 'Geeklog\\') === 0) {
// New classes under \Geeklog namespace
$className = str_replace('Geeklog\\', '', $className);
Expand Down
1 change: 1 addition & 0 deletions system/classes/story.class.php
Expand Up @@ -332,6 +332,7 @@ class Story
*/
public function __construct($mode = 'admin')
{
\Geeklog\Autoload::load('gltext');
$this->mode = $mode;
}

Expand Down

0 comments on commit c7890ec

Please sign in to comment.