Merge branch 'master' into enable-rest-api-from-plugins

This commit is contained in:
Erik
2015-04-28 08:12:34 -05:00
50 changed files with 331 additions and 156 deletions

View File

@@ -98,7 +98,7 @@ class Upgrade
$installedMD5 = "";
} else {
$time = microtime(1);
$installedMD5 = md5_file($installedFile);
$installedMD5 = G::encryptFileOld($installedFile);
$checksumTime += microtime(1) - $time;
}
$archiveMD5 = $checksum;

View File

@@ -752,14 +752,19 @@ class Derivation
//$appFields['APP_PROC_CODE'] = $nextDel['TAS_DEF_PROC_CODE'];
/*----------------------------------********---------------------------------*/
if ($nextDel['TAS_UID'] != '-1') {
$taskCur = TaskPeer::retrieveByPK($nextDel['TAS_UID']);
$aTask = $taskCur->toArray( BasePeer::TYPE_FIELDNAME );
$taskNex = TaskPeer::retrieveByPK($nextDel['TAS_UID']);
$aTask = $taskNex->toArray( BasePeer::TYPE_FIELDNAME );
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
if (!in_array($aTask['TAS_TYPE'], $arrayTaskTypeToExclude)) {
if (!empty($iNewDelIndex) && empty($aSP)) {
$oAppDel = AppDelegationPeer::retrieveByPK( $appFields['APP_UID'], $iNewDelIndex );
$aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME );
$aFields['APP_STATUS'] = $currentDelegation['APP_STATUS'];
$taskCur = TaskPeer::retrieveByPK($currentDelegation['TAS_UID']);
$aTaskCur = $taskCur->toArray( BasePeer::TYPE_FIELDNAME );
if ($aTaskCur['TAS_TYPE'] == "INTERMEDIATE-CATCH-MESSAGE-EVENT") {
$removeList = false;
}
$aFields['REMOVED_LIST'] = $removeList;
$inbox = new ListInbox();
$inbox->newRow($aFields, $appFields['CURRENT_USER_UID'], false, array(), ($nextDel['TAS_ASSIGN_TYPE'] == 'SELF_SERVICE' ? true : false));

View File

@@ -399,22 +399,19 @@ class PMPluginRegistry
}
/**
* get status plugin in the singleton
* Get status plugin in the singleton
*
* @param unknown_type $sNamespace
* @param string $name Plugin name
*
* return mixed Return a string with status plugin, 0 otherwise
*/
public function getStatusPlugin ($sNamespace)
public function getStatusPlugin($name)
{
foreach ($this->_aPluginDetails as $namespace => $detail) {
if ($sNamespace == $namespace) {
if ($this->_aPluginDetails[$sNamespace]->enabled) {
return 'enabled';
} else {
return 'disabled';
}
}
try {
return (isset($this->_aPluginDetails[$name]))? (($this->_aPluginDetails[$name]->enabled)? "enabled" : "disabled") : 0;
} catch (Excepton $e) {
throw $e;
}
return 0;
}
/**

View File

@@ -260,7 +260,7 @@ class System
continue;
}
if (file_exists( realpath( $filename ) )) {
if (strcmp( $checksum, md5_file( realpath( $filename ) ) ) != 0) {
if (strcmp( $checksum, G::encryptFileOld( realpath( $filename ) ) ) != 0) {
$result['diff'][] = $filename;
}
} else {
@@ -542,7 +542,7 @@ class System
$file = PATH_TRUNK . trim( $line[2] );
if (is_readable( $file )) {
$size = sprintf( "%07d", filesize( $file ) );
$checksum = sprintf( "%010u", crc32( file_get_contents( $file ) ) );
$checksum = sprintf( "%010u", G::encryptCrc32( file_get_contents( $file ) ) );
if (! ($line[0] == $size && $line[1] == $checksum) && substr( $file, - 4 ) != '.xml') {
$distinctFiles .= $file . "\n";
$distinct ++;

View File

@@ -61,7 +61,7 @@ class AddonsManager extends BaseAddonsManager
if ($download_md5 == null) {
return null;
}
return (strcasecmp(md5_file($filename), $download_md5) == 0);
return (strcasecmp(G::encryptFileOld($filename), $download_md5) == 0);
}
/**

View File

@@ -367,7 +367,7 @@ class Application extends BaseApplication
$pin = G::generateCode(4, 'ALPHANUMERIC');
$this->setAppData(serialize(array('PIN' => $pin)));
$this->setAppPin(md5($pin));
$this->setAppPin(G::encryptOld($pin));
$c = new Criteria();
$c->clearSelectColumns();