BUG 8875 "ExtJS based Login & Main ProcessMaker interface" (1st commit)

This commit is contained in:
Erik Amaru Ortiz
2012-03-29 16:42:09 -04:00
parent 0106280056
commit bd2aef2e66
87 changed files with 8549 additions and 270 deletions

View File

@@ -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';