BUG 8875 "ExtJS based Login & Main ProcessMaker interface" (1st commit)
This commit is contained in:
@@ -11,6 +11,44 @@ class Admin extends Controller
|
||||
|
||||
public $debug = true;
|
||||
|
||||
public function system()
|
||||
{
|
||||
require_once PATH_CONTROLLERS . 'main.php';
|
||||
G::loadClass('system');
|
||||
$skinsList = System::getSkingList();
|
||||
$skins = array();
|
||||
$timeZonesList = System::getAllTimeZones();
|
||||
$timeZonesList = array_keys($timeZonesList);
|
||||
$mainController = new Main();
|
||||
$languagesList = $mainController->getLanguagesList();
|
||||
$sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
|
||||
|
||||
foreach ($skinsList['skins'] as $skin) {
|
||||
$skins[] = array($skin['SKIN_FOLDER_ID'], $skin['SKIN_NAME']);
|
||||
}
|
||||
$skins[] = array('uxmodern', 'uxmodern');
|
||||
|
||||
foreach ($timeZonesList as $tz) {
|
||||
$timeZones[] = array($tz, $tz);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->includeExtJS('admin/system');
|
||||
//G::LoadClass('configuration');
|
||||
|
||||
// $c = new Configurations();
|
||||
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$this->setJSVar('skinsList', $skins);
|
||||
$this->setJSVar('languagesList', $languagesList);
|
||||
$this->setJSVar('timeZonesList', $timeZones);
|
||||
$this->setJSVar('sysConf', $sysConf);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
public function uxList()
|
||||
{
|
||||
require_once PATH_CONTROLLERS . 'adminProxy.php';
|
||||
|
||||
@@ -25,6 +25,80 @@
|
||||
|
||||
class adminProxy extends HttpProxyController
|
||||
{
|
||||
public function saveSystemConf($httpData)
|
||||
{
|
||||
G::loadClass('system');
|
||||
$envFile = PATH_CONFIG . 'env.ini';
|
||||
$updateRedirector = false;
|
||||
$restart = false;
|
||||
|
||||
if (!file_exists($envFile) ) { // if ini file doesn't exists
|
||||
if (!is_writable(PATH_CONFIG)) {
|
||||
throw new Exception('The enviroment config directory is not writable. <br/>Please give write permission to directory: /workflow/engine/config');
|
||||
}
|
||||
$content = ";\r\n";
|
||||
$content .= "; ProcessMaker System Bootstrap Configuration\r\n";
|
||||
$content .= ";\r\n";
|
||||
file_put_contents($envFile, $content);
|
||||
//@chmod($envFile, 0777);
|
||||
}
|
||||
else {
|
||||
if (!is_writable($envFile)) {
|
||||
throw new Exception('The enviroment ini file file is not writable. <br/>Please give write permission to file: /workflow/engine/config/env.ini');
|
||||
}
|
||||
}
|
||||
|
||||
$sysConf = System::getSystemConfiguration($envFile);
|
||||
|
||||
$updatedConf = array();
|
||||
|
||||
if ($sysConf['default_lang'] != $httpData->default_lang) {
|
||||
$updatedConf['default_lang'] = $sysConf['default_lang'] = $httpData->default_lang;
|
||||
$updateRedirector = true;
|
||||
}
|
||||
|
||||
if ($sysConf['default_skin'] != $httpData->default_skin) {
|
||||
$updatedConf['default_skin'] = $sysConf['default_skin'] = $httpData->default_skin;
|
||||
$updateRedirector = true;
|
||||
}
|
||||
|
||||
if ($sysConf['time_zone'] != $httpData->time_zone) {
|
||||
$updatedConf['time_zone'] = $httpData->time_zone;
|
||||
}
|
||||
|
||||
$httpData->memory_limit .= 'M';
|
||||
if ($sysConf['memory_limit'] != $httpData->memory_limit) {
|
||||
$updatedConf['memory_limit'] = $httpData->memory_limit;
|
||||
}
|
||||
|
||||
|
||||
if ($updateRedirector) {
|
||||
if (!file_exists(PATH_HTML . 'index.html')) {
|
||||
if (!is_writable(PATH_HTML)) {
|
||||
throw new Exception('The public directory is not writable. <br/>Please give write permission to file: /workflow/public_html');
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!is_writable(PATH_HTML . 'index.html')) {
|
||||
throw new Exception('The public index file is not writable. <br/>Please give write permission to file: /workflow/public_html/index.html');
|
||||
}
|
||||
}
|
||||
|
||||
System::updateIndexFile(array(
|
||||
'lang' => $sysConf['default_lang'],
|
||||
'skin' => $sysConf['default_skin']
|
||||
));
|
||||
|
||||
$restart = true;
|
||||
}
|
||||
|
||||
G::update_php_ini($envFile, $updatedConf);
|
||||
|
||||
$this->success = true;
|
||||
$this->restart = $restart;
|
||||
$this->message = 'Saved Successfully';
|
||||
}
|
||||
|
||||
function uxUserUpdate($httpData)
|
||||
{
|
||||
require_once 'classes/model/Users.php';
|
||||
|
||||
1057
workflow/engine/controllers/installer.php
Normal file
1057
workflow/engine/controllers/installer.php
Normal file
File diff suppressed because it is too large
Load Diff
1050
workflow/engine/controllers/main.php
Normal file
1050
workflow/engine/controllers/main.php
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user