Merge remote branch 'upstream/master'

This commit is contained in:
jennylee
2014-05-20 10:59:17 -04:00
7 changed files with 60 additions and 26 deletions

View File

@@ -197,7 +197,7 @@ class Installer
$db_text = "<?php\n" . "// Processmaker configuration\n" . "define ('DB_ADAPTER', 'mysql' );\n" . "define ('DB_HOST', '" . $this->options['database']['hostname'] . ":" . $myPort . "' );\n" . "define ('DB_NAME', '" . $wf . "' );\n" . "define ('DB_USER', '" . (($this->cc_status == 1) ? $wf : $this->options['database']['username']) . "' );\n" . "define ('DB_PASS', '" . (($this->cc_status == 1) ? $this->options['password'] : $this->options['database']['password']) . "' );\n" . "define ('DB_RBAC_HOST', '" . $this->options['database']['hostname'] . ":" . $myPort . "' );\n" . "define ('DB_RBAC_NAME', '" . $rb . "' );\n" . "define ('DB_RBAC_USER', '" . (($this->cc_status == 1) ? $rb : $this->options['database']['username']) . "' );\n" . "define ('DB_RBAC_PASS', '" . (($this->cc_status == 1) ? $this->options['password'] : $this->options['database']['password']) . "' );\n" . "define ('DB_REPORT_HOST', '" . $this->options['database']['hostname'] . ":" . $myPort . "' );\n" . "define ('DB_REPORT_NAME', '" . $rp . "' );\n" . "define ('DB_REPORT_USER', '" . (($this->cc_status == 1) ? $rp : $this->options['database']['username']) . "' );\n" . "define ('DB_REPORT_PASS', '" . (($this->cc_status == 1) ? $this->options['password'] : $this->options['database']['password']) . "' );\n";
if (defined('PARTNER_FLAG') || isset($_REQUEST['PARTNER_FLAG'])) {
$db_text .= "define ('PARTNER_FLAG', " . ((defined('PARTNER_FLAG')) ? PARTNER_FLAG : ((isset($_REQUEST['PARTNER_FLAG'])) ? $_REQUEST['PARTNER_FLAG']:'false')) . ");\n";
$db_text .= "define ('PARTNER_FLAG', " . ((defined('PARTNER_FLAG') && PARTNER_FLAG != '') ? PARTNER_FLAG : ((isset($_REQUEST['PARTNER_FLAG'])) ? $_REQUEST['PARTNER_FLAG']:'false')) . ");\n";
if (defined('SYSTEM_NAME')) {
$db_text .= " define ('SYSTEM_NAME', '" . SYSTEM_NAME . "');\n";
}

View File

@@ -3089,7 +3089,7 @@ class wsBase
}
if (! empty( $unpauseDate )) {
if (! preg_match( "/^\d{4}-\d{2}-\d{2}$/", $unpauseDate )) {
if (! preg_match( "/^\d{4}-\d{2}-\d{2}| \d{2}:\d{2}:\d{2}$/", $unpauseDate )) {
$result = new wsResponse( 100, G::LoadTranslation( "ID_INVALID_DATA" ) . " $unpauseDate" );
$g->sessionVarRestore();

View File

@@ -143,9 +143,6 @@ class UsersProperties extends BaseUsersProperties
if (! defined( 'PPP_EXPIRATION_IN' )) {
define( 'PPP_EXPIRATION_IN', 0 );
}
if (! defined( 'PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN' )) {
define( 'PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN', 0 );
}
if (function_exists( 'mb_strlen' )) {
$iLength = mb_strlen( $sPassword );
} else {
@@ -177,9 +174,9 @@ class UsersProperties extends BaseUsersProperties
G::LoadClass( 'calendar' );
$oCalendar = new calendar();
if ($oCalendar->pmCalendarUid == '') {
$oCalendar->pmCalendarUid = '00000000000000000000000000000001';
$oCalendar->getCalendarData();
if ($oCalendar->pmCalendarUid == '') {
$oCalendar->pmCalendarUid = '00000000000000000000000000000001';
$oCalendar->getCalendarData();
}
$fDays = $oCalendar->calculateDuration( date( 'Y-m-d H:i:s' ), $sLastUpdate );
@@ -187,10 +184,8 @@ class UsersProperties extends BaseUsersProperties
$aErrors[] = 'ID_PPP_EXPIRATION_IN';
}
}
if (PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN == 1) {
if ($iChangePasswordNextTime == 1) {
$aErrors[] = 'ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN';
}
if ($iChangePasswordNextTime == 1) {
$aErrors[] = 'ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN';
}
return $aErrors;
}

View File

@@ -41,8 +41,21 @@ $oTemplatePower->newBlock('users');
$oTemplatePower->assign('USR_UID', $aUser['USR_UID']);
$oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')');
*/
$userName = 'admin';
require_once 'classes/model/Users.php';
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME);
$oCriteria->add( UsersPeer::USR_UID, '00000000000000000000000000000001', Criteria::IN );
$oDataset = UsersPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$aData = array ();
if ($oDataset->next()) {
$aData = $oDataset->getRow();
$userName = $aData['USR_USERNAME'];
}
$oTemplatePower->assign("URL_MABORAK_JS", G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
$oTemplatePower->assign("name", $userName);
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );

View File

@@ -140,6 +140,9 @@ switch ($_POST['action']) {
if (!isset($form['USR_AUTH_USER_DN'])) {
$form['USR_AUTH_USER_DN'] = '';
}
if (!isset($form['USR_LOGGED_NEXT_TIME'])) {
$form['USR_LOGGED_NEXT_TIME'] = 0;
}
if ($form['USR_UID'] == '') {
$criteria = new Criteria();
@@ -208,6 +211,11 @@ switch ($_POST['action']) {
die;
}
*/
require_once 'classes/model/UsersProperties.php';
$oUserProperty = new UsersProperties();
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(md5($aData['USR_PASSWORD'])))));
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
$oUserProperty->update($aUserProperty);
} else {
$aData['USR_UID'] = $form['USR_UID'];
@@ -229,7 +237,7 @@ switch ($_POST['action']) {
}
if ($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'] == 'PROCESSMAKER_ADMIN') {
$aUserProperty['USR_LAST_UPDATE_DATE'] = date('Y-m-d H:i:s');
$aUserProperty['USR_LOGGED_NEXT_TIME'] = 1;
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
$oUserProperty->update($aUserProperty);
}
@@ -292,7 +300,7 @@ switch ($_POST['action']) {
$aHistory[] = $form['USR_PASSWORD'];
}
$aUserProperty['USR_LAST_UPDATE_DATE'] = date('Y-m-d H:i:s');
$aUserProperty['USR_LOGGED_NEXT_TIME'] = 1;
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
$aUserProperty['USR_PASSWORD_HISTORY'] = serialize($aHistory);
$oUserProperty->update($aUserProperty);
}
@@ -499,7 +507,12 @@ switch ($_POST['action']) {
$aFields['USER_LOGGED_ROLE'] = $aUserLog['USR_ROLE'];
$aFields['CASES_MENUSELECTED_NAME'] = $casesMenuSelected;
require_once 'classes/model/UsersProperties.php';
$oUserProperty = new UsersProperties();
$aFieldsUserProperty = $oUserProperty->load($_POST['USR_UID']);
$aFields['USR_LOGGED_NEXT_TIME'] = $aFieldsUserProperty['USR_LOGGED_NEXT_TIME'];
$result->success = true;
$result->user = $aFields;

View File

@@ -71,19 +71,17 @@
<span class="cLow"><strong>Get Started</strong></span>
<p><span class="cLow">Welcome to ProcessMaker!</span></p>
<p><span class="cLow">To get started, log in using the following credentials. You can change them later:</span></p>
<span class="cNeg">Username:</span><span class="cLow"> admin</span><br>
<span class="cNeg">Password:</span><span class="cLow"> admin</span>
<p><span class="cLow">We suggest you follow our 7 easy videos to automate your workflow. You can see a demo of each step at&nbsp;<a target="_blank" href="http://www.processmaker.com/demos/">http://www.processmaker.com/demos/</a> </span></p>
<span class="cNeg">Username:</span><span class="cLow"> {name}</span><br>
<span class="cNeg">Password:</span><span class="cLow"> The password introduced at the time of installing the application</span>
<p><span class="cLow">We suggest you follow our 7 easy videos to automate your workflow. You can see a demo of each step at&nbsp;<a target="_blank" href="http://www.processmaker.com/demos/">http://www.processmaker.com/demos/</a> </span></p>
<span class="cLow">Other Resources:</span><br/><br/>
<span class="cLow">Other Resources:</span><br/><br/>
<span class="cLow"><a target="_blank" href="http://library.processmaker.com">PM Library </a>- Import Templates</span><br/>
<span class="cLow"><a target="_blank" href="http://wiki.processmaker.com">PM Wiki </a>- Manuals</span><br/>
<span class="cLow"><a target="_blank" href="http://wiki.processmaker.com">PM Wiki </a>- Manuals</span><br/>
<span class="cLow"><a target="_blank" href="http://forum.processmaker.com">PM Forum </a>- Ask Questions</span><br/>
<span class="cLow"><a target="_blank" href="http://forum.processmaker.com">PM Forum </a>- Ask Questions</span><br/>
<p><span class="cLow">We hope you enjoy using ProcessMaker. For more information about our enterprise support and consulting services <a target="_blank" href="http://www.processmaker.com/contact-us">contact us.</a>
<p><span class="cLow">We hope you enjoy using ProcessMaker. For more information about our enterprise support and consulting services <a target="_blank" href="http://www.processmaker.com/contact-us">contact us.</a>
</span></p>
<p><span class="cLow">The ProcessMaker Team</span></p>

View File

@@ -620,7 +620,20 @@ Ext.onReady(function () {
]
});
var accountOptions = new Ext.form.FieldSet({
title: _('ID_ACCOUNT_OPTIONS'),
items: [{
xtype: 'checkbox',
id: 'USR_LOGGED_NEXT_TIME',
name: 'USR_LOGGED_NEXT_TIME',
boxLabel: _('ID_USER_MUST_CHANGE_PASSWORD_AT_NEXT_LOGON'),
value: 0,
inputValue: 1,
uncheckedValue: 0
}]
});
storeDefaultMainMenuOption = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: "usersAjax",
@@ -727,6 +740,7 @@ Ext.onReady(function () {
items : [
informationFields,
passwordFields,
accountOptions,
profileFields,
preferencesFields
],
@@ -1277,7 +1291,8 @@ function loadUserData()
USR_PHONE : data.user.USR_PHONE,
USR_POSITION : data.user.USR_POSITION,
USR_DUE_DATE : data.user.USR_DUE_DATE,
USR_STATUS : data.user.USR_STATUS
USR_STATUS : data.user.USR_STATUS,
USR_LOGGED_NEXT_TIME : data.user.USR_LOGGED_NEXT_TIME
});
if (infoMode) {