Merge remote-tracking branch 'origin/bugfix/HOR-3670' into bugfix/HOR-3670-HQ
This commit is contained in:
@@ -291,7 +291,7 @@ class actionsByEmailCoreClass extends PMPlugin
|
||||
}
|
||||
}
|
||||
|
||||
$wsBaseInstance = new wsBase();
|
||||
$wsBaseInstance = new WsBase();
|
||||
$result = $wsBaseInstance->sendMessage(
|
||||
$data->APP_UID,
|
||||
$emailFrom,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/class AppDocumentDrive
|
||||
{
|
||||
/**
|
||||
* @var PMDrive $drive
|
||||
* @var PmDrive $drive
|
||||
*/
|
||||
private $drive;
|
||||
/**
|
||||
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->drive = new PMDrive();
|
||||
$this->drive = new PmDrive();
|
||||
$status = $this->drive->getServiceDriveStatus();
|
||||
$status = !empty($status) ? ($status == 1 ? true : false): false;
|
||||
$this->usersEmail = '';
|
||||
|
||||
@@ -5,13 +5,7 @@ class Dashboards
|
||||
{
|
||||
public function getListDashboards ($start=0, $limit=20, $sort='', $dir='DESC', $search='')
|
||||
{
|
||||
require_once 'classes/model/Dashboard.php';
|
||||
require_once 'classes/model/DashboardIndicator.php';
|
||||
require_once 'classes/model/Users.php';
|
||||
require_once 'classes/model/Groupwf.php';
|
||||
require_once 'classes/model/DashboardDasInd.php';
|
||||
|
||||
|
||||
$limit_size = isset($limit) ? $limit: 20;
|
||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/interfaces/DashletInterface.php';
|
||||
|
||||
|
||||
class dashletOpenVSCompleted implements DashletInterface
|
||||
class DashletOpenVsCompleted implements DashletInterface
|
||||
{
|
||||
|
||||
const version = '1.0';
|
||||
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/interfaces/DashletInterface.php';
|
||||
|
||||
|
||||
class dashletProcessMakerCommunity implements DashletInterface
|
||||
class DashletProcessMakerCommunity implements DashletInterface
|
||||
{
|
||||
|
||||
const version = '1.0';
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/interfaces/DashletInterface.php';
|
||||
|
||||
|
||||
class dashletProcessMakerEnterprise implements DashletInterface
|
||||
class DashletProcessMakerEnterprise implements DashletInterface
|
||||
{
|
||||
|
||||
const version = '1.0';
|
||||
|
||||
@@ -651,7 +651,7 @@ class IndicatorsCalculator
|
||||
|
||||
private function pdoConnection() {
|
||||
$currentWS = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
|
||||
$workSpace = new workspaceTools($currentWS);
|
||||
$workSpace = new WorkspaceTools($currentWS);
|
||||
$arrayHost = explode(':', $workSpace->dbHost);
|
||||
$host = "host=".$arrayHost[0];
|
||||
$port = count($arrayHost) > 1 ? ";port=".$arrayHost[1] : "";
|
||||
|
||||
@@ -98,9 +98,9 @@ class labelsGmail
|
||||
//The Subject to search the email
|
||||
$subject = "[PM] " . $proName . " (" . $index . ") Case: " . $appNumber;
|
||||
|
||||
$pmGoogle = new PMGoogleApi();
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
$pmGoogle->setUser($mail);
|
||||
$pmGoogle->setScope(PMGoogleApi::GMAIL_MODIFY);
|
||||
$pmGoogle->setScope(PmGoogleApi::GMAIL_MODIFY);
|
||||
$client = $pmGoogle->serviceClient();
|
||||
$service = new Google_Service_Gmail($client);
|
||||
$labelsIds = $this->getLabelsIds($service);
|
||||
@@ -148,9 +148,9 @@ class labelsGmail
|
||||
//The Subject to search the email
|
||||
$subject = "[PM] " . $proName . " (" . $index . ") Case: " . $appNumber;
|
||||
|
||||
$pmGoogle = new PMGoogleApi();
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
$pmGoogle->setUser($mail);
|
||||
$pmGoogle->setScope(PMGoogleApi::GMAIL_MODIFY);
|
||||
$pmGoogle->setScope(PmGoogleApi::GMAIL_MODIFY);
|
||||
$client = $pmGoogle->serviceClient();
|
||||
$service = new Google_Service_Gmail($client);
|
||||
$labelsIds = $this->getLabelsIds($service);
|
||||
@@ -202,11 +202,11 @@ class labelsGmail
|
||||
//The Subject to search the email
|
||||
$subject = "[PM] " . $proName . " (" . $index . ") Case: " . $appNumber;
|
||||
|
||||
$pmGoogle = new PMGoogleApi();
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
|
||||
$pmGoogle->setUser($mail);
|
||||
|
||||
$pmGoogle->setScope(PMGoogleApi::GMAIL_MODIFY);
|
||||
$pmGoogle->setScope(PmGoogleApi::GMAIL_MODIFY);
|
||||
$client = $pmGoogle->serviceClient();
|
||||
|
||||
$service = new Google_Service_Gmail($client);
|
||||
@@ -281,9 +281,9 @@ class labelsGmail
|
||||
|
||||
//The Subject to search the email
|
||||
$subject = "[PM] " . $proName . " (" . $index . ") Case: " . $appNumber;
|
||||
$pmGoogle = new PMGoogleApi();
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
$pmGoogle->setUser($mail);
|
||||
$pmGoogle->setScope(PMGoogleApi::GMAIL_MODIFY);
|
||||
$pmGoogle->setScope(PmGoogleApi::GMAIL_MODIFY);
|
||||
$client = $pmGoogle->serviceClient();
|
||||
$service = new Google_Service_Gmail($client);
|
||||
$labelsIds = $this->getLabelsIds($service);
|
||||
@@ -329,11 +329,11 @@ class labelsGmail
|
||||
*/
|
||||
public function deletePMGmailLabels($mail)
|
||||
{
|
||||
$pmGoogle = new PMGoogleApi();
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
|
||||
$pmGoogle->setUser($mail);
|
||||
|
||||
$pmGoogle->setScope(PMGoogleApi::GMAIL_MODIFY);
|
||||
$pmGoogle->setScope(PmGoogleApi::GMAIL_MODIFY);
|
||||
$client = $pmGoogle->serviceClient();
|
||||
|
||||
$service = new Google_Service_Gmail($client);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Exports the database and copies the files to an tar archive o several if the max filesize is reached.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Class MultipleFilesBackup
|
||||
* create a backup of this workspace
|
||||
@@ -135,7 +135,7 @@
|
||||
if (empty( $metaFiles )) {
|
||||
$metaFiles = glob( $tempDirectory . "/*.txt" );
|
||||
if (! empty( $metaFiles )) {
|
||||
return workspaceTools::restoreLegacy( $tempDirectory );
|
||||
return WorkspaceTools::restoreLegacy( $tempDirectory );
|
||||
} else {
|
||||
throw new Exception( "No metadata found in backup" );
|
||||
}
|
||||
@@ -170,7 +170,7 @@
|
||||
} else {
|
||||
CLI::logging( "> Restoring " . CLI::info( $backupWorkspace ) . " to " . CLI::info( $workspaceName ) . "\n" );
|
||||
}
|
||||
$workspace = new workspaceTools( $workspaceName );
|
||||
$workspace = new WorkspaceTools( $workspaceName );
|
||||
if ($workspace->workspaceExists()) {
|
||||
if ($overwrite) {
|
||||
CLI::logging( CLI::warning( "> Workspace $workspaceName already exist, overwriting!" ) . "\n" );
|
||||
@@ -194,7 +194,7 @@
|
||||
CLI::logging( "> Changing file permissions\n" );
|
||||
$shared_stat = stat( PATH_DATA );
|
||||
if ($shared_stat !== false) {
|
||||
workspaceTools::dirPerms( $workspace->path, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode'] );
|
||||
WorkspaceTools::dirPerms( $workspace->path, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode'] );
|
||||
} else {
|
||||
CLI::logging( CLI::error( "Could not get the shared folder permissions, not changing workspace permissions" ) . "\n" );
|
||||
}
|
||||
|
||||
@@ -1,29 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* class.processes.php
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Object Document class
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class, helping to set some not desirable settings but necesary
|
||||
* @author reav
|
||||
*
|
||||
*/
|
||||
|
||||
abstract
|
||||
class p11835 extends patch
|
||||
class P11835 extends patch
|
||||
{
|
||||
/*
|
||||
* Note.- Use before upgrade DB.
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
require_once 'classes/interfaces/DashletInterface.php';
|
||||
require_once 'classes/model/Dashlet.php';
|
||||
require_once 'classes/model/DashletInstance.php';
|
||||
|
||||
|
||||
class PMDashlet extends DashletInstance implements DashletInterface
|
||||
class PmDashlet extends DashletInstance implements DashletInterface
|
||||
{
|
||||
|
||||
// Own properties
|
||||
@@ -1,15 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.pmDrive.php
|
||||
*
|
||||
* @package workflow.engine.
|
||||
/**
|
||||
* class.pmDrive.php
|
||||
*
|
||||
* @package workflow.engine.class
|
||||
*
|
||||
*/class PMDrive extends PMGoogleApi
|
||||
*/
|
||||
class PmDrive extends PmGoogleApi
|
||||
{
|
||||
private $folderIdPMDrive = '';
|
||||
private $folderNamePMDrive;
|
||||
@@ -11,7 +11,7 @@ require_once PATH_TRUNK . 'vendor' . PATH_SEP . 'google' . PATH_SEP . 'apiclient
|
||||
/**
|
||||
* class.pmGoogleApi.php
|
||||
*
|
||||
*/class PMGoogleApi
|
||||
*/class PmGoogleApi
|
||||
{
|
||||
const DRIVE = 'https://www.googleapis.com/auth/drive';
|
||||
const DRIVE_FILE = 'https://www.googleapis.com/auth/drive.file';
|
||||
@@ -93,7 +93,7 @@ class PmSystem
|
||||
$aWorkspaces = array ();
|
||||
foreach (glob( PATH_DB . "*" ) as $filename) {
|
||||
if (is_dir( $filename ) && file_exists( $filename . "/db.php" )) {
|
||||
$aWorkspaces[] = new workspaceTools( basename( $filename ) );
|
||||
$aWorkspaces[] = new WorkspaceTools( basename( $filename ) );
|
||||
}
|
||||
}
|
||||
return $aWorkspaces;
|
||||
|
||||
@@ -1,24 +1,5 @@
|
||||
<?php
|
||||
|
||||
function ls_dir($dir, $basename = null)
|
||||
{
|
||||
$files = array();
|
||||
//if (substr($dir, -1) != "/")
|
||||
// $dir .= "/";
|
||||
if ($basename == null) {
|
||||
$basename = $dir;
|
||||
}
|
||||
foreach (glob("$dir/*") as $filename) {
|
||||
//var_dump(substr($filename, strlen($basename) + 1));
|
||||
if (is_dir($filename)) {
|
||||
$files = array_merge($files, ls_dir($filename, $basename));
|
||||
} else {
|
||||
$files[] = substr($filename, strlen($basename) + 1);
|
||||
}
|
||||
}
|
||||
return $files;
|
||||
}
|
||||
|
||||
|
||||
class Upgrade
|
||||
{
|
||||
@@ -33,13 +14,11 @@ class Upgrade
|
||||
{
|
||||
|
||||
$filter = new InputFilter();
|
||||
//echo "Starting core installation...\n";
|
||||
$start = microtime(1);
|
||||
$filename = $this->addon->getDownloadFilename();
|
||||
$time = microtime(1);
|
||||
|
||||
$archive = new Archive_Tar ($filename);
|
||||
//printf("Time to open archive: %f\n", microtime(1) - $time);
|
||||
$time = microtime(1);
|
||||
$extractDir = dirname($this->addon->getDownloadFilename()) . "/extract";
|
||||
$extractDir = $filter->xssFilterHard($extractDir);
|
||||
@@ -54,34 +33,22 @@ class Upgrade
|
||||
if (!is_dir($backupDir)) {
|
||||
mkdir($backupDir);
|
||||
}
|
||||
//printf("Time to remove old directory: %f\n", microtime(1) - $time);
|
||||
|
||||
$time = microtime(1);
|
||||
echo "Extracting files...\n";
|
||||
$archive->extractModify($extractDir, 'processmaker');
|
||||
//printf("Time to extract all files: %f\n", microtime(1) - $time);
|
||||
//$time = microtime(1);
|
||||
//$files = $archive->listContent();
|
||||
//printf("Time to get list of contents: %f\n", microtime(1) - $time);
|
||||
/*$time = microtime(1);
|
||||
foreach ($files as $fileinfo)
|
||||
if (basename($fileinfo['filename']) == 'checksum.txt') {
|
||||
$checksumFile = $archive->extractInString($fileinfo['filename']);
|
||||
break;
|
||||
}
|
||||
printf("Time to get checksum.txt: %f\n", microtime(1) - $time);
|
||||
*/
|
||||
$checksumFile = file_get_contents("$extractDir/checksum.txt");
|
||||
$time = microtime(1);
|
||||
$checksums = array();
|
||||
foreach (explode("\n", $checksumFile) as $line) {
|
||||
$checksums[trim(substr($line, 33))] = substr($line, 0, 32);
|
||||
}
|
||||
//printf("Time to assemble list of checksums: %f\n", microtime(1) - $time);
|
||||
|
||||
$checksum = array();
|
||||
$changedFiles = array();
|
||||
$time = microtime(1);
|
||||
$files = ls_dir($extractDir);
|
||||
//printf("Time to list files: %f\n", microtime(1) - $time);
|
||||
$files = $this->ls_dir($extractDir);
|
||||
|
||||
echo "Updating ProcessMaker files...\n";
|
||||
$time = microtime(1);
|
||||
$checksumTime = 0;
|
||||
@@ -116,8 +83,7 @@ class Upgrade
|
||||
}
|
||||
}
|
||||
}
|
||||
//printf("Time to create all checksums: %f\n", $checksumTime);
|
||||
//printf("Time to copy files: %f\n", microtime(1) - $time);
|
||||
|
||||
printf("Updated %d files\n", count($changedFiles));
|
||||
printf("Clearing cache...\n");
|
||||
if (defined('PATH_C')) {
|
||||
@@ -137,9 +103,24 @@ class Upgrade
|
||||
$first = false;
|
||||
} catch (Exception $e) {
|
||||
printf("Errors upgrading workspace {$workspace->name}: {$e->getMessage()}\n");
|
||||
//$errors = true;
|
||||
}
|
||||
}
|
||||
//printf("Time to install: %f\n", microtime(1) - $start);
|
||||
}
|
||||
|
||||
private function ls_dir($dir, $basename = null)
|
||||
{
|
||||
$files = array();
|
||||
if ($basename == null) {
|
||||
$basename = $dir;
|
||||
}
|
||||
foreach (glob("$dir/*") as $filename) {
|
||||
if (is_dir($filename)) {
|
||||
$files = array_merge($files, $this->ls_dir($filename, $basename));
|
||||
} else {
|
||||
$files[] = substr($filename, strlen($basename) + 1);
|
||||
}
|
||||
}
|
||||
return $files;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,15 +3,14 @@
|
||||
use ProcessMaker\Util\FixReferencePath;
|
||||
use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
|
||||
/**
|
||||
*
|
||||
/**
|
||||
* class workspaceTools.
|
||||
*
|
||||
* Utility functions to manage a workspace.
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/class workspaceTools
|
||||
*/
|
||||
class WorkspaceTools
|
||||
{
|
||||
public $name = null;
|
||||
public $path = null;
|
||||
@@ -868,8 +867,8 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
public function upgradeDatabase($onedb = false, $checkOnly = false)
|
||||
{
|
||||
$this->initPropel(true);
|
||||
p11835::$dbAdapter = $this->dbAdapter;
|
||||
p11835::isApplicable();
|
||||
P11835::$dbAdapter = $this->dbAdapter;
|
||||
P11835::isApplicable();
|
||||
$systemSchema = PmSystem::getSystemSchema($this->dbAdapter);
|
||||
$systemSchemaRbac = PmSystem::getSystemSchemaRbac($this->dbAdapter);// get the Rbac Schema
|
||||
$this->registerSystemTables(array_merge($systemSchema, $systemSchemaRbac));
|
||||
@@ -943,7 +942,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
}
|
||||
}
|
||||
|
||||
p11835::execute();
|
||||
P11835::execute();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1236,11 +1235,11 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
public function printMetadata($printSysInfo = true)
|
||||
{
|
||||
if ($printSysInfo) {
|
||||
workspaceTools::printSysInfo();
|
||||
WorkspaceTools::printSysInfo();
|
||||
CLI::logging("\n");
|
||||
}
|
||||
|
||||
workspaceTools::printInfo($this->getMetadata());
|
||||
WorkspaceTools::printInfo($this->getMetadata());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1576,7 +1575,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
$data = file_get_contents($metafile);
|
||||
$workspaceData = G::json_decode($data);
|
||||
CLI::logging("\n");
|
||||
workspaceTools::printInfo((array)$workspaceData);
|
||||
WorkspaceTools::printInfo((array)$workspaceData);
|
||||
}
|
||||
|
||||
G::rm_dir($tempDirectory);
|
||||
@@ -1600,7 +1599,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
if (basename($item) == "." || basename($item) == "..") {
|
||||
continue;
|
||||
}
|
||||
workspaceTools::dirPerms($item, $owner, $group, $perms);
|
||||
WorkspaceTools::dirPerms($item, $owner, $group, $perms);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1639,7 +1638,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
if (empty($metaFiles)) {
|
||||
$metaFiles = glob($tempDirectory . "/*.txt");
|
||||
if (!empty($metaFiles)) {
|
||||
return workspaceTools::restoreLegacy($tempDirectory);
|
||||
return WorkspaceTools::restoreLegacy($tempDirectory);
|
||||
} else {
|
||||
throw new Exception("No metadata found in backup");
|
||||
}
|
||||
@@ -1694,7 +1693,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
} else {
|
||||
CLI::logging("> Restoring " . CLI::info($backupWorkspace) . " to " . CLI::info($workspaceName) . "\n");
|
||||
}
|
||||
$workspace = new workspaceTools($workspaceName);
|
||||
$workspace = new WorkspaceTools($workspaceName);
|
||||
|
||||
if (PmInstaller::isset_site($workspaceName)) {
|
||||
if ($overwrite) {
|
||||
@@ -1727,7 +1726,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
$shared_stat = stat(PATH_DATA);
|
||||
|
||||
if ($shared_stat !== false) {
|
||||
workspaceTools::dirPerms($workspace->path, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
|
||||
WorkspaceTools::dirPerms($workspace->path, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
|
||||
} else {
|
||||
CLI::logging(CLI::error("Could not get the shared folder permissions, not changing workspace permissions") . "\n");
|
||||
}
|
||||
@@ -2019,7 +2018,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
CLI::logging(" Copying Enterprise Directory to $pathNewFile...\n");
|
||||
|
||||
if ($shared_stat !== false) {
|
||||
workspaceTools::dirPerms($pathDirectoryEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
|
||||
WorkspaceTools::dirPerms($pathDirectoryEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
|
||||
} else {
|
||||
CLI::logging(CLI::error("Could not get shared folder permissions, workspace permissions couldn't be changed") . "\n");
|
||||
}
|
||||
@@ -2036,7 +2035,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
if (file_exists($pathFileEnterprise)) {
|
||||
CLI::logging(" Copying Enterprise.php file to $pathNewFile...\n");
|
||||
if ($shared_stat !== false) {
|
||||
workspaceTools::dirPerms($pathFileEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
|
||||
WorkspaceTools::dirPerms($pathFileEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
|
||||
} else {
|
||||
CLI::logging(CLI::error("Could not get shared folder permissions, workspace permissions couldn't be changed") . "\n");
|
||||
}
|
||||
@@ -3771,7 +3770,7 @@ use ProcessMaker\Plugins\Adapters\PluginAdapter;
|
||||
CLI::logging("-> Populating PRO_ID, USR_ID at LIST_* \n");
|
||||
$con->begin();
|
||||
$stmt = $con->createStatement();
|
||||
foreach (workspaceTools::$populateIdsQueries as $query) {
|
||||
foreach (WorkspaceTools::$populateIdsQueries as $query) {
|
||||
$stmt->executeQuery($query);
|
||||
}
|
||||
$con->commit();
|
||||
|
||||
@@ -1,38 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* class.wsBase.php
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
//It works with the table CONFIGURATION in a WF dataBase
|
||||
|
||||
|
||||
/**
|
||||
* Copyright (C) 2009 COLOSA
|
||||
* License: LGPL, see LICENSE
|
||||
* Last Modify: 26.06.2008 10:05:00
|
||||
* Last modify by: Erik Amaru Ortiz <erik@colosa.com>
|
||||
* Last Modify comment(26.06.2008): the session expired verification was removed from here to soap
|
||||
/**
|
||||
* Copyright (C) 2009 COLOSA
|
||||
* License: LGPL, see LICENSE
|
||||
@@ -41,7 +10,8 @@
|
||||
* Last Modify comment(26.06.2008): the session expired verification was removed from here to soap class
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/class wsBase
|
||||
*/
|
||||
class WsBase
|
||||
{
|
||||
public $stored_system_variables; //boolean
|
||||
public $wsSessionId; //web service session id, if the wsbase function is used from a WS request
|
||||
@@ -1488,7 +1458,7 @@
|
||||
{
|
||||
try {
|
||||
if (trim( $groupName ) == '') {
|
||||
$result = new wsCreateGroupResponse( 25, G::loadTranslation( 'ID_GROUP_NAME_REQUIRED' ), '' );
|
||||
$result = new WsCreateGroupResponse( 25, G::loadTranslation( 'ID_GROUP_NAME_REQUIRED' ), '' );
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -1498,7 +1468,7 @@
|
||||
|
||||
$data['GROUP_NAME'] = $groupName;
|
||||
|
||||
$result = new wsCreateGroupResponse( 0, G::loadTranslation( 'ID_GROUP_CREATED_SUCCESSFULLY', SYS_LANG, $data ), $groupId );
|
||||
$result = new WsCreateGroupResponse( 0, G::loadTranslation( 'ID_GROUP_CREATED_SUCCESSFULLY', SYS_LANG, $data ), $groupId );
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
@@ -1519,7 +1489,7 @@
|
||||
{
|
||||
try {
|
||||
if (trim( $departmentName ) == '') {
|
||||
$result = new wsCreateDepartmentResponse( 25, G::loadTranslation( 'ID_DEPARTMENT_NAME_REQUIRED' ), '' );
|
||||
$result = new WsCreateDepartmentResponse( 25, G::loadTranslation( 'ID_DEPARTMENT_NAME_REQUIRED' ), '' );
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1527,13 +1497,13 @@
|
||||
$department = new Department();
|
||||
|
||||
if (($parentUID != '') && ! ($department->existsDepartment( $parentUID ))) {
|
||||
$result = new wsCreateDepartmentResponse( 26, G::loadTranslation( 'ID_PARENT_DEPARTMENT_NOT_EXIST' ), $parentUID );
|
||||
$result = new WsCreateDepartmentResponse( 26, G::loadTranslation( 'ID_PARENT_DEPARTMENT_NOT_EXIST' ), $parentUID );
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($department->checkDepartmentName( $departmentName, $parentUID )) {
|
||||
$result = new wsCreateDepartmentResponse( 27, G::loadTranslation( 'ID_DEPARTMENT_EXISTS' ), '' );
|
||||
$result = new WsCreateDepartmentResponse( 27, G::loadTranslation( 'ID_DEPARTMENT_EXISTS' ), '' );
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1547,7 +1517,7 @@
|
||||
$data['PARENT_UID'] = $parentUID;
|
||||
$data['DEPARTMENT_NAME'] = $departmentName;
|
||||
|
||||
$result = new wsCreateDepartmentResponse( 0, G::loadTranslation( 'ID_DEPARTMENT_CREATED_SUCCESSFULLY', SYS_LANG, $data ), $departmentId );
|
||||
$result = new WsCreateDepartmentResponse( 0, G::loadTranslation( 'ID_DEPARTMENT_CREATED_SUCCESSFULLY', SYS_LANG, $data ), $departmentId );
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -1,41 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.wsResponse.php
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Class wsCreateDepartmentResponse
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/class wsCreateDepartmentResponse
|
||||
*/
|
||||
class WsCreateDepartmentResponse
|
||||
{
|
||||
public $status_code = 0;
|
||||
public $message = '';
|
||||
|
||||
@@ -1,41 +1,11 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.wsResponse.php
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Class wsCreateGroupResponse
|
||||
*
|
||||
* @package workflow.engine.classes
|
||||
*/class wsCreateGroupResponse
|
||||
*/
|
||||
class WsCreateGroupResponse
|
||||
{
|
||||
public $status_code = 0;
|
||||
public $message = '';
|
||||
|
||||
@@ -960,7 +960,7 @@ function PMFSendMessage(
|
||||
}
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->sendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
@@ -1558,7 +1558,7 @@ function WSAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMa
|
||||
*/
|
||||
function PMFTaskCase ($caseId) //its test was successfull
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->taskCase( $caseId );
|
||||
$rows = Array ();
|
||||
$i = 1;
|
||||
@@ -1586,7 +1586,7 @@ function PMFTaskCase ($caseId) //its test was successfull
|
||||
*/
|
||||
function PMFTaskList ($userId) //its test was successfull
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->taskList( $userId );
|
||||
$rows = Array ();
|
||||
$i = 1;
|
||||
@@ -1613,7 +1613,7 @@ function PMFTaskList ($userId) //its test was successfull
|
||||
*/
|
||||
function PMFUserList () //its test was successfull
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->userList();
|
||||
$rows = Array ();
|
||||
$i = 1;
|
||||
@@ -1920,7 +1920,7 @@ function PMFGenerateOutputDocument ($outputID, $sApplication = null, $index = nu
|
||||
*/
|
||||
function PMFGroupList ($regex = null, $start = null, $limit = null) //its test was successfull
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->groupList($regex, $start, $limit);
|
||||
$rows = array();
|
||||
if ($result) {
|
||||
@@ -1944,7 +1944,7 @@ function PMFGroupList ($regex = null, $start = null, $limit = null) //its test w
|
||||
*/
|
||||
function PMFRoleList () //its test was successfull
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->roleList();
|
||||
$rows = Array ();
|
||||
$i = 1;
|
||||
@@ -1972,7 +1972,7 @@ function PMFRoleList () //its test was successfull
|
||||
*/
|
||||
function PMFCaseList ($userId) //its test was successfull
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->caseList( $userId );
|
||||
$rows = Array ();
|
||||
$i = 1;
|
||||
@@ -1999,7 +1999,7 @@ function PMFCaseList ($userId) //its test was successfull
|
||||
*/
|
||||
function PMFProcessList () //its test was successfull
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->processList();
|
||||
$rows = Array ();
|
||||
$i = 1;
|
||||
@@ -2028,7 +2028,7 @@ function PMFProcessList () //its test was successfull
|
||||
*/
|
||||
function PMFSendVariables ($caseId, $variables)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
|
||||
$result = $ws->sendVariables( $caseId, $variables );
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2071,7 +2071,7 @@ function PMFDerivateCase ($caseId, $delIndex, $bExecuteTriggersBeforeAssignment
|
||||
$sUserLogged = $_SESSION['USER_LOGGED'];
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->derivateCase( $sUserLogged, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment );
|
||||
if (is_array($result)) {
|
||||
$result = (object)$result;
|
||||
@@ -2103,7 +2103,7 @@ function PMFDerivateCase ($caseId, $delIndex, $bExecuteTriggersBeforeAssignment
|
||||
*/
|
||||
function PMFNewCaseImpersonate ($processId, $userId, $variables, $taskId = '')
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->newCaseImpersonate( $processId, $userId, $variables, $taskId);
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2133,7 +2133,7 @@ function PMFNewCaseImpersonate ($processId, $userId, $variables, $taskId = '')
|
||||
*/
|
||||
function PMFNewCase ($processId, $userId, $taskId, $variables, $status = null)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
|
||||
$result = $ws->newCase($processId, $userId, $taskId, $variables, 0, $status);
|
||||
|
||||
@@ -2163,7 +2163,7 @@ function PMFNewCase ($processId, $userId, $taskId, $variables, $status = null)
|
||||
*/
|
||||
function PMFAssignUserToGroup ($userId, $groupId)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->assignUserToGroup( $userId, $groupId );
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2196,7 +2196,7 @@ function PMFAssignUserToGroup ($userId, $groupId)
|
||||
*/
|
||||
function PMFCreateUser ($userId, $password, $firstname, $lastname, $email, $role, $dueDate = null, $status = null)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->createUser( $userId, $firstname, $lastname, $email, $role, $password, $dueDate, $status );
|
||||
|
||||
//When the user is created the $result parameter is an array, in other case is a object exception
|
||||
@@ -2235,7 +2235,7 @@ function PMFCreateUser ($userId, $password, $firstname, $lastname, $email, $role
|
||||
*/
|
||||
function PMFUpdateUser ($userUid, $userName, $firstName = null, $lastName = null, $email = null, $dueDate = null, $status = null, $role = null, $password = null)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->updateUser( $userUid, $userName, $firstName, $lastName, $email, $dueDate, $status, $role, $password );
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2261,7 +2261,7 @@ function PMFUpdateUser ($userUid, $userName, $firstName = null, $lastName = null
|
||||
*/
|
||||
function PMFInformationUser($userUid)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->informationUser($userUid);
|
||||
|
||||
$info = array();
|
||||
@@ -2735,7 +2735,7 @@ function PMFGetCaseNotes ($applicationID, $type = 'array', $userUid = '')
|
||||
*/
|
||||
function PMFDeleteCase ($caseUid)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->deleteCase( $caseUid );
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2763,7 +2763,7 @@ function PMFDeleteCase ($caseUid)
|
||||
*/
|
||||
function PMFCancelCase ($caseUid, $delIndex, $userUid)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->cancelCase( $caseUid, $delIndex, $userUid );
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2802,7 +2802,7 @@ function PMFCancelCase ($caseUid, $delIndex, $userUid)
|
||||
*/
|
||||
function PMFPauseCase ($caseUid, $delIndex, $userUid, $unpauseDate = null)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->pauseCase($caseUid, $delIndex, $userUid, $unpauseDate);
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2840,7 +2840,7 @@ function PMFPauseCase ($caseUid, $delIndex, $userUid, $unpauseDate = null)
|
||||
*/
|
||||
function PMFUnpauseCase ($caseUid, $delIndex, $userUid)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->unpauseCase( $caseUid, $delIndex, $userUid );
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2871,7 +2871,7 @@ function PMFUnpauseCase ($caseUid, $delIndex, $userUid)
|
||||
*/
|
||||
function PMFAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->addCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail);
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
@@ -2970,7 +2970,7 @@ function PMFSaveCurrentData ()
|
||||
$response = 0;
|
||||
|
||||
if (isset($_SESSION['APPLICATION']) && isset($oPMScript->aFields)) {
|
||||
$ws = new wsBase();
|
||||
$ws = new WsBase();
|
||||
$result = $ws->sendVariables($_SESSION['APPLICATION'], $oPMScript->aFields);
|
||||
$response = $result->status_code == 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -387,7 +387,6 @@ class AddonsManager extends BaseAddonsManager
|
||||
$this->setState();
|
||||
} else {
|
||||
if ($this->getAddonType() == "core") {
|
||||
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.Upgrade.php';
|
||||
$upgrade = new Upgrade($this);
|
||||
|
||||
$upgrade->install();
|
||||
|
||||
@@ -281,7 +281,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
$licensedFeatures = &PMLicensedFeatures::getSingleton ();
|
||||
if ($licensedFeatures->verifyfeature ( '7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09' )) {
|
||||
try{
|
||||
$pmGoogle = new PMGoogleApi ();
|
||||
$pmGoogle = new PmGoogleApi ();
|
||||
if ($pmGoogle->getServiceGmailStatus()) {
|
||||
$Pmgmail = new \ProcessMaker\BusinessModel\Pmgmail();
|
||||
$Pmgmail->gmailsForRouting($sUsrUid, $sTasUid, $sAppUid, $delIndex, $isSubprocess);
|
||||
|
||||
@@ -361,7 +361,7 @@ class Content extends BaseContent
|
||||
FROM CONTENT
|
||||
ORDER BY CON_ID, CON_CATEGORY, CON_PARENT, CON_LANG";
|
||||
|
||||
$workSpace = new workspaceTools( $workSpace );
|
||||
$workSpace = new WorkspaceTools( $workSpace );
|
||||
$workSpace->getDBInfo();
|
||||
|
||||
$link = @mysql_pconnect( $workSpace->dbHost, $workSpace->dbUser, $workSpace->dbPass) or die( "Could not connect" );
|
||||
|
||||
Reference in New Issue
Block a user