Beispiel #1
0
 private static function initModules()
 {
     if (!Dog_Module::inited()) {
         self::initModulesDir('dog_module');
         if (GWF3::getConfig('env') === 'dev') {
             self::initModulesDir('dog_module_dev');
         }
         self::initModulesDir('dog_module_user_' . Dog::getUnixUsername());
         self::initModulesDir('dog_module_secret');
     }
 }
Beispiel #2
0
 public static function getPlugins($name)
 {
     self::$PLUGIN = array();
     GWF_File::filewalker(self::getPlugDir(), array(__CLASS__, 'getPlugRec'), false, true, $name);
     if (GWF3::getConfig('env') === 'dev') {
         GWF_File::filewalker(self::getPlugDirDev(), array(__CLASS__, 'getPlugRec'), false, true, $name);
     }
     GWF_File::filewalker(self::getPlugDirUser(), array(__CLASS__, 'getPlugRec'), false, true, $name);
     GWF_File::filewalker(self::getPlugDirSecret(), array(__CLASS__, 'getPlugRec'), false, true, $name);
     usort(self::$PLUGIN, array(__CLASS__, 'sort_power_descending'));
     return self::$PLUGIN;
 }
Beispiel #3
0
# Require config
$config_file = $argv[1];
require_once '../../../www/protected/' . $config_file;
# and gwf
require_once '../../../gwf3.class.php';
$gwf = new GWF3(NULL, array('init' => true, 'bootstrap' => false, 'website_init' => false, 'autoload_modules' => false, 'load_module' => false, 'load_config' => false, 'start_debug' => true, 'get_user' => false, 'do_logging' => false, 'log_request' => false, 'blocking' => true, 'no_session' => true, 'store_last_url' => false, 'ignore_user_abort' => false, 'kick_banned_ip' => false, 'env' => isset($argv[5]) ? $argv[5] : 'prod', 'unix_user' => isset($argv[6]) ? $argv[6] : 'root'));
# That´s all of GWF3 we will share with the worker.
GWF_HTML::init();
GWF_Debug::setDieOnError(false);
GWF_Debug::setMailOnError(false);
$_GET['ajax'] = 1;
# And this is the worker process
require 'dog_include/Dog_WorkerThread.php';
$worker = new Dog_WorkerThread();
$worker->start();
# Parent resources
GWF_Log::init(false, GWF_Log::_DEFAULT - GWF_Log::BUFFERED, GWF_PATH . 'www/protected/logs/dog');
gdo_db();
# Dog please
require_once 'Dog.php';
Dog::setUnixUsername(GWF3::getConfig('unix_user'));
# Dog installer
if (isset($argv[2]) && $argv[2] === 'install') {
    require_once 'mini_install.php';
}
# Dog init
Dog_Init::init($worker);
# Dog l(a)unch
if (!defined('DOG_NO_LAUNCH') && Dog_Init::validate()) {
    Dog::mainloop();
}