if i see good it's already made it by script
*/
private static $instance;
public static function create(Gpf_Application $application) {
setlocale(LC_ALL, 'en.UTF-8');
self::$instance = $application;
self::$instance->registerRolePrivileges();
self::$instance->initLogger();
self::$instance->addSmartyPluginsDir();
$timezone = Gpf_Settings_Gpf::DEFAULT_TIMEZONE;
try {
$timezone = Gpf_Settings::get(Gpf_Settings_Gpf::TIMEZONE_NAME);
} catch (Gpf_Exception $e) {
Gpf_Log::error('Unable to load timezone: %s - using default one.', $e->getMessage());
}
if(false === @date_default_timezone_set($timezone)) {
Gpf_Log::error('Unable to set timezone %s:', $timezone);
}
}
public function getDefaultLanguage() {
return 'en-US';
}
/**
* @return Gpf_Application
*/
public static function getInstance() {
if(self::$instance === null) {
throw new Gpf_Exception('Application not initialize');
}
return self::$instance;
}
and this is part where problem is
abstract class Gpf_ApplicationSettings extends Gpf_Object {
/**
* @var Gpf_Data_RecordSet
*/
private $recordSet;
const CODE = "code";
const VALUE = "value";
protected function loadSetting() {
$this->addValue("theme", Gpf_Session::getAuthUser()->getTheme());
$this->addValue("date_time_format", 'MM/d/yyyy HH:mm:ss');
$this->addValue("programVersion", Gpf_Application::getInstance()->getVersion());
$this->addValue(Gpf_Settings_Gpf::NOT_FORCE_EMAIL_USERNAMES, Gpf_Settings::get(Gpf_Settings_Gpf::NOT_FORCE_EMAIL_USERNAMES));
$quickLaunchSettings = new Gpf_Desktop_QuickLaunch();
$this->addValue(Gpf_Desktop_QuickLaunch::SHOW_QUICK_LAUNCH, $quickLaunchSettings->getShowQuickLaunch());
$this->addValue(Gpf_Settings_Gpf::REGIONAL_SETTINGS_THOUSANDS_SEPARATOR,
Gpf_Settings_Regional::getinstance()->getThousandsSeparator());
$this->addValue(Gpf_Settings_Gpf::REGIONAL_SETTINGS_DECIMAL_SEPARATOR, Gpf_Settings_Regional::getInstance()->getDecimalSeparator());
$this->addValue(Gpf_Settings_Gpf::REGIONAL_SETTINGS_DATE_FORMAT, Gpf_Settings_Regional::getInstance()->getDateFormat());
$this->addValue(Gpf_Settings_Gpf::REGIONAL_SETTINGS_TIME_FORMAT, Gpf_Settings_Regional::getInstance()->getTimeFormat());
Gpf_Plugins_Engine::extensionPoint('Core.loadSetting', $this);
}