@@ -28,6 +28,8 @@ G::LoadSystem("g");
|
||||
CLI::taskName('flush-cache');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Flush cache of all workspaces of a given workspace
|
||||
|
||||
If no workspace is specified, then the cache will be flushed in all available workspaces.
|
||||
EOT
|
||||
);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ CLI::taskName("hotfix-install");
|
||||
CLI::taskDescription(<<<EOT
|
||||
Install hotfix to system
|
||||
|
||||
This command is executed when you want to update certain files, which have improvements or bugs solutions.
|
||||
This command installs a hotfix, which updates ProcessMaker in order to add improvements or fix bugs.
|
||||
EOT
|
||||
);
|
||||
|
||||
|
||||
@@ -31,11 +31,14 @@ CLI::taskName('mafe-translation');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Creates labels of mafe for the database
|
||||
|
||||
If no workspace is specified, then the translation labels will be created in all available workspaces.
|
||||
EOT
|
||||
);
|
||||
|
||||
CLI::taskArg('workspace', true, true);
|
||||
CLI::taskOpt("lang", "languaje", "l:","lang=");
|
||||
CLI::taskOpt("lang", "Specify the language to create the translation labels. If not specified then the language will be 'en' (English) by default.
|
||||
Ex: -lfr (French)
|
||||
Ex: --lang=zh-CN (Mainland Chinese)", "lLANG","lang=LANG");
|
||||
CLI::taskRun('run_create_translation');
|
||||
|
||||
function run_create_translation($args, $opts)
|
||||
|
||||
@@ -31,6 +31,9 @@ CLI::taskName('plugins-translation-update');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Update plugin translations
|
||||
|
||||
LANG is the language, such as 'fr' (French) or 'zh-CN' (mainland Chinese).
|
||||
If the language is not specified, then it is 'en' (English) by default.
|
||||
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg('plugin', false);
|
||||
@@ -41,6 +44,9 @@ CLI::taskName('plugins-translation-create');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Create .po file for the plugin
|
||||
|
||||
LANG is the language, such as 'fr' (French) or 'zh-CN' (mainland Chinese).
|
||||
If the language is not specified, then it is 'en' (English) by default.
|
||||
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg('plugin', true);
|
||||
|
||||
@@ -29,10 +29,11 @@ CLI::taskName('build-js');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Generate Javascript Files
|
||||
|
||||
This command should be run after any modification of javascript files in
|
||||
folder gulliver/js/*.
|
||||
This command should be run after any modification of JavaScript files in
|
||||
the gulliver/js/* directory.
|
||||
EOT
|
||||
);
|
||||
CLI::taskOpt("lang", "", "lLANG","lang=LANG");
|
||||
//CLI::taskOpt("minify", "If the option is enabled, performs the build only with minified files", "min", "buildmin");
|
||||
CLI::taskRun("minify_javascript");
|
||||
|
||||
|
||||
@@ -31,23 +31,24 @@ G::LoadSystem("dbMaintenance");
|
||||
G::LoadClass("cli");
|
||||
|
||||
CLI::taskName('upgrade');
|
||||
CLI::taskDescription("Upgrade workspaces.\n\n This command should be run after ProcessMaker files are upgraded so that all workspaces are upgraded to the current version.");
|
||||
CLI::taskDescription("Upgrade workspaces.\n\n This command should be run after upgrading ProcessMaker to a new version so that all workspaces are also upgraded to the\n new version.");
|
||||
|
||||
CLI::taskOpt("buildACV", "If the option is enabled, performs the Build Cache View.", "ACV", "buildACV");
|
||||
CLI::taskOpt("buildACV", "If this option is enabled, the Cache View is built.", "ACV", "buildACV");
|
||||
CLI::taskRun("run_upgrade");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::taskName('unify-database');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Unify Rbac, Reports and Workflow databases schemas to match the latest version
|
||||
Unify RBAC, Reports and Workflow database schemas to match the latest version
|
||||
|
||||
Specify the workspaces whose databases schemas should be unifyied.
|
||||
Specify the workspaces whose databases schemas should be unified.
|
||||
If no workspace is specified, then the database schema will be upgraded or
|
||||
repaired on all available workspaces.
|
||||
|
||||
This command will read the system schema and attempt to modify the workspaces
|
||||
tables to match this new schema. Use this command to unify databases
|
||||
schemas or before ProcessMaker has been upgraded, so the database schemas will
|
||||
changed to match the new ProcessMaker code.
|
||||
This command will read the system schema and attempt to modify the workspaces'
|
||||
tables to match this new schema. In version 2.8 and later, it will merge the 3
|
||||
databases used in previous versions of ProcessMaker into one database. This
|
||||
command may be used after upgrading from ProcessMaker 2.5 to a later version
|
||||
of ProcessMaker.
|
||||
EOT
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -37,13 +37,12 @@ CLI::taskRun("run_info");
|
||||
|
||||
CLI::taskName('workspace-backup');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Backup the specified workspace to an archive.
|
||||
Backup the specified workspace to a file.
|
||||
|
||||
BACKUP-FILE is the backup filename. If it contains slashes, it will be
|
||||
treated as a path and filename, either absolute or relative. Otherwise, it
|
||||
will be treated as a filename inside the 'shared/backups' directory.
|
||||
If no BACKUP-FILE is specified, it will use the workspace name as the
|
||||
filename.
|
||||
BACKUP-FILE is the backup filename which will be created. If it contains
|
||||
slashes, it will be treated as a path and filename, either absolute or relative.
|
||||
Otherwise, it will be treated as a filename inside the "shared/backups" directory.
|
||||
If no BACKUP-FILE is specified, it will use the workspace name as the filename.
|
||||
|
||||
A backup archive will contain all information about the specified workspace
|
||||
so that it can be restored later. The archive includes a database dump and
|
||||
@@ -52,12 +51,12 @@ EOT
|
||||
);
|
||||
CLI::taskArg('workspace', false);
|
||||
CLI::taskArg('backup-file', true);
|
||||
CLI::taskOpt("filesize", "Set the max size of the compressed splitted files, by default the max is 1000 Mb.", "s:","filesize=");
|
||||
CLI::taskOpt("filesize", "Split the backup file in multiple files which are compressed. The maximum size of these files is set to MAX-SIZE in megabytes. If MAX-SIZE is not set, then it is 1000 megabytes by default. It may be necessary to use this option if using a 32 bit Linux/UNIX system which limits its maximum file size to 2GB. This option does not work on Windows systems.", "sMAX-SIZE","filesize=MAX-SIZE");
|
||||
CLI::taskRun("run_workspace_backup");
|
||||
|
||||
CLI::taskName('workspace-restore');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Restore a workspace from a backup.
|
||||
Restore a workspace from a backup file
|
||||
|
||||
BACKUP-FILE is the backup filename. If it contains slashes, it will be
|
||||
treated as a path and filename, either absolute or relative. Otherwise, it
|
||||
@@ -70,12 +69,13 @@ EOT
|
||||
CLI::taskArg('backup-file', false);
|
||||
CLI::taskArg('workspace', true);
|
||||
CLI::taskOpt("overwrite", "If a workspace already exists, overwrite it.", "o", "overwrite");
|
||||
CLI::taskOpt("info", "Only shows information about a backup archive.", "i");
|
||||
CLI::taskOpt("multiple", "Restore from multiple compresed enumerated files.", "m");
|
||||
CLI::taskOpt("workspace", "Select which workspace to restore if multiple workspaces are present in the archive.",
|
||||
"w:", "workspace=");
|
||||
CLI::taskOpt("lang", "You must specify language on which rebuild of the case cache list builder will be done; if you don't specify this, it will use 'en' by default", "l:","lang=");
|
||||
CLI::taskOpt("port", "You must specify mysql port.", "p:");
|
||||
CLI::taskOpt("info", "Show information about backup file, but do not restore any workspaces.", "i");
|
||||
CLI::taskOpt("multiple", "Restore from multiple compressed backup files which are numbered.", "m");
|
||||
CLI::taskOpt("workspace", "Specify which workspace to restore if multiple workspaces are present in the backup file.
|
||||
Ex: -wworkflow.",
|
||||
"wWORKSPACE", "workspace=WORKSPACE");
|
||||
CLI::taskOpt("lang", "Specify the language which will be used to rebuild the case cache list. If this option isn't included, then 'en' (English) will be used by default.", "lLANG","lang=LANG");
|
||||
CLI::taskOpt("port", "Specify the port number used by MySQL. If not specified, then the port 3306 will be used by default.", "pPORT");
|
||||
CLI::taskRun("run_workspace_restore");
|
||||
|
||||
CLI::taskName('cacheview-repair');
|
||||
@@ -93,21 +93,21 @@ CLI::taskDescription(<<<EOT
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg('workspace', true, true);
|
||||
CLI::taskOpt("lang", "You must specify language on which rebuild of the case cache list builder will be done; if you don't specify this, it will use 'en' by default", "l:","lang=");
|
||||
CLI::taskOpt("lang", "Specify the language to rebuild the case cache list. If not specified, then 'en' (English) will be used by default.\n Ex: -lfr (French) Ex: --lang=zh-CN (Mainland Chinese)", "lLANG", "lang=LANG");
|
||||
CLI::taskRun("run_cacheview_upgrade");
|
||||
|
||||
CLI::taskName('database-upgrade');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Upgrade or repair the database schema to match the latest version
|
||||
|
||||
Specify the workspaces whose database schema should be upgraded or repaired.
|
||||
Specify the workspaces whose database schema should be upgraded or repaired.
|
||||
If no workspace is specified, then the database schema will be upgraded or
|
||||
repaired on all available workspaces.
|
||||
|
||||
This command will read the system schema and attempt to modify the workspaces
|
||||
tables to match this new schema. Use this command to fix corrupted database
|
||||
This command will read the system schema and attempt to modify the workspaces
|
||||
tables to match this new schema. Use this command to fix corrupted database
|
||||
schemas or after ProcessMaker has been upgraded, so the database schemas will
|
||||
changed to match the new ProcessMaker code.
|
||||
be changed to match the new ProcessMaker code.
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg('workspace', true, true);
|
||||
@@ -117,12 +117,13 @@ CLI::taskName('plugins-database-upgrade');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Upgrade or repair the database schema for plugins to match the latest version
|
||||
|
||||
Specify the workspaces whose database schema should be upgraded or repaired
|
||||
Specify the workspaces whose database schema should be upgraded or repaired
|
||||
for plugins. If no workspace is specified, then the database schema will be
|
||||
upgraded or repaired on all available workspaces.
|
||||
|
||||
The same as database-upgrade but works with schemas provided by plugins.
|
||||
This is useful if there are installed plugins that include database schemas.
|
||||
This is the same as database-upgrade but it works with schemas provided
|
||||
by plugins. This is useful if plugins are installed that include
|
||||
database schemas.
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg('workspace', true, true);
|
||||
@@ -130,17 +131,17 @@ CLI::taskRun("run_plugins_database_upgrade");
|
||||
|
||||
CLI::taskName('workspace-upgrade');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Upgrade the workspace(s) specified.
|
||||
Upgrade the specified workspace(s).
|
||||
|
||||
If no workspace is specified, the command will be run in all workspaces. More
|
||||
than one workspace can be specified.
|
||||
|
||||
This command is a shortcut to execute all upgrade commands for workspaces.
|
||||
This command is a shortcut to execute all the upgrade commands for workspaces.
|
||||
Upgrading a workspace will make it correspond to the current version of
|
||||
ProcessMaker.
|
||||
|
||||
Use this command to upgrade workspaces individually, otherwise use the
|
||||
upgrade command to upgrade the entire system.
|
||||
'processmaker upgrade' command to upgrade the entire system.
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg('workspace-name', true, true);
|
||||
@@ -154,7 +155,7 @@ CLI::taskDescription(<<<EOT
|
||||
than one workspace can be specified.
|
||||
|
||||
This command will go through each language installed in ProcessMaker and
|
||||
update this workspace translations to match the current version of
|
||||
update the translations for the workspace(s) to match the current version of
|
||||
ProcessMaker.
|
||||
EOT
|
||||
);
|
||||
@@ -169,16 +170,17 @@ CLI::taskDescription(<<<EOT
|
||||
EOT
|
||||
);
|
||||
//CLI::taskArg('workspace', true);
|
||||
CLI::taskOpt("workspace", "Select which workspace to migrate the cases folders, if multiple workspaces are present in the server.",
|
||||
"w:", "workspace=");
|
||||
CLI::taskOpt("workspace", "Select the workspace whose case folders will be migrated, if multiple workspaces are present in the server.\n Ex: -wworkflow. Ex: --workspace=workflow",
|
||||
"wWORKSPACE", "workspace=WORKSPACE");
|
||||
CLI::taskRun("runStructureDirectories");
|
||||
|
||||
CLI::taskName("database-generate-self-service-by-value");
|
||||
CLI::taskDescription(<<<EOT
|
||||
Generate or upgrade the table "self-service by value".
|
||||
|
||||
This command populate the table "self-service by value", this for the cases when
|
||||
a task it's defined with "Self Service Value Based Assignment" in "Assignment Rules".
|
||||
This command populates the table "self-service by value" for cases whose
|
||||
task is defined with "Self Service Value Based Assignment" in "Assignment
|
||||
Rules".
|
||||
|
||||
If no workspace is specified, the command will be run in all workspaces. More
|
||||
than one workspace can be specified.
|
||||
@@ -192,10 +194,10 @@ CLI::taskName("check-workspace-disabled-code");
|
||||
CLI::taskDescription(<<<EOT
|
||||
Check disabled code for the specified workspace(s).
|
||||
|
||||
This command is for check disabled code for the specified workspace(s).
|
||||
This command checks the disabled code in the specified workspace(s).
|
||||
|
||||
If no workspace is specified, the command will be run in all workspaces. More
|
||||
than one workspace can be specified.
|
||||
If no workspace is specified, the command will be run in all workspaces.
|
||||
More than one workspace can be specified.
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg("workspace-name", true, true);
|
||||
|
||||
@@ -131,16 +131,17 @@ class CLI
|
||||
{
|
||||
global $argv;
|
||||
$scriptName = $argv[0];
|
||||
if (is_array( $args )) {
|
||||
if (is_array($args) && count($args) > 0 ) {
|
||||
$taskName = $args[0];
|
||||
} else {
|
||||
$taskName = $args;
|
||||
}
|
||||
|
||||
if (! $taskName) {
|
||||
echo "usage: $scriptName <task> [options] [args]\n";
|
||||
echo "Type '$scriptName help <task-name>' for help on a specific task\n";
|
||||
echo "\nAvailable tasks:\n";
|
||||
echo "usage: processmaker <task> [options] [args]\n";
|
||||
echo " If using Linux/UNIX, prepend './' to specify the directory: " . $scriptName . " <task> [options] [args]\n";
|
||||
echo "Type 'processmaker help <task>' for help on a specific task.";
|
||||
echo "\n\nAvailable tasks:\n";
|
||||
$tasks = array ();
|
||||
ksort( self::$tasks );
|
||||
foreach (self::$tasks as $name => $data) {
|
||||
@@ -180,13 +181,16 @@ class CLI
|
||||
}
|
||||
$valid_args[] = $arg;
|
||||
}
|
||||
|
||||
$nameHotfixFile = ($taskName == "hotfix-install")? "HOTFIX-FILE" : "";
|
||||
|
||||
$valid_args = join( " ", $valid_args );
|
||||
$description = explode( "\n", self::$tasks[$taskName]['description'] );
|
||||
$taskDescription = trim( array_shift( $description ) );
|
||||
$description = trim( implode( "\n", $description ) );
|
||||
$message = <<< EOT
|
||||
$taskName: {$taskDescription}
|
||||
Usage: $scriptName $taskName $valid_args
|
||||
Usage: processmaker $taskName $nameHotfixFile $valid_args
|
||||
|
||||
$description
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class PMLicensedFeatures
|
||||
private $features = array ();
|
||||
private $newFeatures = array(
|
||||
0 => array(
|
||||
"description" => "Enables de Actions By Email feature.",
|
||||
"description" => "Actions By Email allows users to enter information and route cases via email.",
|
||||
"enabled" => false,
|
||||
"id" => "actionsByEmail",
|
||||
"latest_version" => "",
|
||||
@@ -46,7 +46,7 @@ class PMLicensedFeatures
|
||||
"version" => ""
|
||||
),
|
||||
1 => array(
|
||||
"description" => "Enables de Batch Routing feature.",
|
||||
"description" => "Batch Routing allows a user to route multiple cases at a time onto the next task in the process. ",
|
||||
"enabled" => false,
|
||||
"id" => "pmConsolidatedCL",
|
||||
"latest_version" => "",
|
||||
@@ -97,7 +97,7 @@ class PMLicensedFeatures
|
||||
"version" => ""
|
||||
),
|
||||
4 => array(
|
||||
"description" => "Registers every admin action in a log. The actions in administration settings options are registered in the log.",
|
||||
"description" => "Registers every administrator action in a log. Any change in the settings under the Admin menu is registered in the log.",
|
||||
"enabled" => false,
|
||||
"id" => "auditLog",
|
||||
"latest_version" => "",
|
||||
@@ -131,7 +131,7 @@ class PMLicensedFeatures
|
||||
"version" => ""
|
||||
),
|
||||
6 => array(
|
||||
"description" => "This functionality enables the flexibility to send mails from different email servers or configurations.",
|
||||
"description" => "This features allows ProcessMaker to send out notifications using different email accounts and email servers.",
|
||||
"enabled" => false,
|
||||
"id" => "sendEmailFromDifferentEmailServers",
|
||||
"latest_version" => "",
|
||||
@@ -423,4 +423,3 @@ class PMLicensedFeatures
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
|
||||
@@ -60026,10 +60026,10 @@ INSERT INTO CATALOG (CAT_UID, CAT_LABEL_ID, CAT_TYPE, CAT_FLAG, CAT_OBSERVATION,
|
||||
('1050','ID_OVER_DUE','INDICATOR','%','Unit for displaying','2015-03-04','2015-03-04');
|
||||
|
||||
INSERT INTO ADDONS_MANAGER (ADDON_DESCRIPTION,ADDON_ID,ADDON_NAME,ADDON_NICK,ADDON_PUBLISHER,ADDON_RELEASE_TYPE,ADDON_STATUS,STORE_ID,ADDON_TYPE,ADDON_DOWNLOAD_URL,ADDON_VERSION,ADDON_DOWNLOAD_PROGRESS) VALUES
|
||||
('Enables de Actions By Email feature.','actionsByEmail','actionsByEmail','actionsByEmail','Colosa','localRegistry','ready','00000000000000000000000000010004','features','','','0'),
|
||||
('Enables de Batch Routing feature.','pmConsolidatedCL','pmConsolidatedCL','pmConsolidatedCL','Colosa','localRegistry','ready','00000000000000000000000000010005','features','','','0'),
|
||||
('Actions By Email allows users to enter information and route cases via email.','actionsByEmail','actionsByEmail','actionsByEmail','Colosa','localRegistry','ready','00000000000000000000000000010004','features','','','0'),
|
||||
('Batch Routing allows a user to route multiple cases at a time onto the next task in the process.','pmConsolidatedCL','pmConsolidatedCL','pmConsolidatedCL','Colosa','localRegistry','ready','00000000000000000000000000010005','features','','','0'),
|
||||
('Dashboard with improved charting graphics and optimized to show strategic information like Process Efficiency and User Efficiency indicators.','strategicDashboards','strategicDashboards','Strategic Dashboards','Colosa','localRegistry','ready','00000000000000000000000000010006','features','','','0'),
|
||||
('Enables the configuration of a second database connection in order to divide the database requests in read and write operations. This features is used with database clusters to improve the application performance.','secondDatabaseConnection','secondDatabaseConnection','secondDatabaseConnection','Colosa','localRegistry','ready','00000000000000000000000000010000','features','','','0'),
|
||||
('A more secure option to store user passwords in ProcessMaker. The modern algorithm SHA-2 is used to store the passwords.','secureUserPasswordHash','secureUserPasswordHash','secureUserPasswordHash','Colosa','localRegistry','ready','00000000000000000000000000010002','features','','','0'),
|
||||
('This functionality enables the flexibility to send mails from different email servers or configurations.','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','Colosa','localRegistry','ready','00000000000000000000000000010003','features','','','0'),
|
||||
('Registers every admin action in a log. The actions in administration settings options are registered in the log.','auditLog','auditLog','auditLog','Colosa','localRegistry','ready','00000000000000000000000000010001','features','','','0');
|
||||
('This features allows ProcessMaker to send out notifications using different email accounts and email servers.','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','Colosa','localRegistry','ready','00000000000000000000000000010003','features','','','0'),
|
||||
('Registers every administrator action in a log. Any change in the settings under the Admin menu is registered in the log.','auditLog','auditLog','auditLog','Colosa','localRegistry','ready','00000000000000000000000000010001','features','','','0');
|
||||
|
||||
@@ -86,14 +86,17 @@ $html .= '</td>';
|
||||
|
||||
$html .= '<td width="25%">';
|
||||
$html .= '<select name="prefix" id="prefix">';
|
||||
|
||||
$html .= '<option value="ID_TO_STRING">@@</option>';
|
||||
$html .= '<option value="ID_TO_FLOAT">@#</option>';
|
||||
$html .= '<option value="ID_TO_INTEGER">@%</option>';
|
||||
$html .= '<option value="ID_TO_URL">@?</option>';
|
||||
$html .= '<option value="ID_SQL_ESCAPE">@$</option>';
|
||||
$html .= '<option value="ID_REPLACE_WITHOUT_CHANGES">@=</option>';
|
||||
|
||||
if ($isBpmn) {
|
||||
$html .= '<option value="ID_TO_STRING">@@</option>';
|
||||
$html .= '<option value="ID_TO_FLOAT">@#</option>';
|
||||
$html .= '<option value="ID_TO_INTEGER">@%</option>';
|
||||
$html .= '<option value="ID_TO_URL">@?</option>';
|
||||
$html .= '<option value="ID_SQL_ESCAPE">@$</option>';
|
||||
$html .= '<option value="ID_REPLACE_WITHOUT_CHANGES">@=</option>';
|
||||
} else {
|
||||
$html .= '<option value="ID_TO_STRING">@@</option>';
|
||||
$html .= '<option value="ID_TO_FLOAT">@#</option>';
|
||||
}
|
||||
$html .= '</select> ';
|
||||
$html .= '</td>';
|
||||
|
||||
|
||||
@@ -31,6 +31,12 @@ class DataBaseConnection
|
||||
while ($row = $rs->getRow()) {
|
||||
$row = array_change_key_case($row, CASE_LOWER);
|
||||
$dataDb = $this->getDataBaseConnection($pro_uid, $row['dbs_uid'], false);
|
||||
|
||||
if($dataDb["dbs_type"] == "oracle" && $dataDb["dbs_connection_type"] == "TNS") {
|
||||
$dataDb["dbs_server"] = "[" . $dataDb["dbs_tns"] . "]";
|
||||
$dataDb["dbs_database_name"] = "[" . $dataDb["dbs_tns"] . "]";
|
||||
}
|
||||
|
||||
$dbConnecions[] = array_change_key_case($dataDb, CASE_LOWER);
|
||||
$rs->next();
|
||||
}
|
||||
@@ -96,6 +102,8 @@ class DataBaseConnection
|
||||
$oContent = new \Content();
|
||||
$dataDBConnection = array_change_key_case($dataDBConnection, CASE_UPPER);
|
||||
|
||||
$flagTns = ($dataDBConnection["DBS_TYPE"] == "oracle" && $dataDBConnection["DBS_CONNECTION_TYPE"] == "TNS")? 1 : 0;
|
||||
|
||||
$dataDBConnection['PRO_UID'] = $pro_uid;
|
||||
|
||||
if (isset($dataDBConnection['DBS_TYPE'])) {
|
||||
@@ -109,17 +117,23 @@ class DataBaseConnection
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($dataDBConnection['DBS_SERVER']) && $dataDBConnection['DBS_SERVER'] == '') {
|
||||
if (isset($dataDBConnection["DBS_SERVER"]) && $dataDBConnection["DBS_SERVER"] == "" && $flagTns == 0) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_DBC_SERVER_INVALID", array($dataDBConnection['DBS_SERVER']))));
|
||||
}
|
||||
|
||||
if (isset($dataDBConnection['DBS_DATABASE_NAME']) && $dataDBConnection['DBS_DATABASE_NAME'] == '') {
|
||||
if (isset($dataDBConnection["DBS_DATABASE_NAME"]) && $dataDBConnection["DBS_DATABASE_NAME"] == "" && $flagTns == 0) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_DBC_DBNAME_INVALID", array($dataDBConnection['DBS_DATABASE_NAME']))));
|
||||
}
|
||||
|
||||
if (isset($dataDBConnection['DBS_PORT']) &&
|
||||
($dataDBConnection['DBS_PORT'] == ''|| $dataDBConnection['DBS_PORT'] == 0)) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_DBC_PORT_INVALID", array($dataDBConnection['DBS_PORT']))));
|
||||
if ($flagTns == 0) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_DBC_PORT_INVALID", array($dataDBConnection["DBS_PORT"]))));
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($dataDBConnection["DBS_TNS"]) && $dataDBConnection["DBS_TNS"] == "" && $flagTns == 1) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_DBC_TNS_NOT_EXIST", array($dataDBConnection["DBS_TNS"]))));
|
||||
}
|
||||
|
||||
if (isset($dataDBConnection['DBS_ENCODE'])) {
|
||||
@@ -140,11 +154,25 @@ class DataBaseConnection
|
||||
if ($dataDBConnection['DBS_PASSWORD'] == 'none') {
|
||||
$dataDBConnection['DBS_PASSWORD'] = '';
|
||||
} else {
|
||||
$pass = G::encrypt( $dataDBConnection['DBS_PASSWORD'], $dataDBConnection['DBS_DATABASE_NAME']) . "_2NnV3ujj3w";
|
||||
if ($flagTns == 0) {
|
||||
$pass = \G::encrypt( $dataDBConnection["DBS_PASSWORD"], $dataDBConnection["DBS_DATABASE_NAME"]) . "_2NnV3ujj3w";
|
||||
} else {
|
||||
$pass = \G::encrypt($dataDBConnection["DBS_PASSWORD"], $dataDBConnection["DBS_TNS"]) . "_2NnV3ujj3w";
|
||||
}
|
||||
|
||||
$dataDBConnection['DBS_PASSWORD'] = $pass;
|
||||
}
|
||||
}
|
||||
|
||||
if ($flagTns == 0) {
|
||||
$dataDBConnection["DBS_CONNECTION_TYPE"] = "NORMAL";
|
||||
$dataDBConnection["DBS_TNS"] = "";
|
||||
} else {
|
||||
$dataDBConnection["DBS_SERVER"] = "";
|
||||
$dataDBConnection["DBS_DATABASE_NAME"] = "";
|
||||
$dataDBConnection["DBS_PORT"] = 0;
|
||||
}
|
||||
|
||||
if ($create) {
|
||||
unset($dataDBConnection['DBS_UID']);
|
||||
// TEST CONNECTION
|
||||
@@ -216,7 +244,11 @@ class DataBaseConnection
|
||||
|
||||
$dataCon = array_change_key_case($dataCon, CASE_UPPER);
|
||||
|
||||
$flagTns = ($dataCon["DBS_TYPE"] == "oracle" && $dataCon["DBS_CONNECTION_TYPE"] == "TNS")? 1 : 0;
|
||||
|
||||
G::LoadClass( 'net' );
|
||||
|
||||
if ($flagTns == 0) {
|
||||
$Server = new \NET($dataCon['DBS_SERVER']);
|
||||
|
||||
// STEP 1 : Resolving Host Name
|
||||
@@ -301,6 +333,54 @@ class DataBaseConnection
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$net = new \NET();
|
||||
|
||||
//STEP 0: Trying to open database type TNS
|
||||
$respTest["0"] = array();
|
||||
$respTest["0"]["test"] = "Test TNS: " . $dataCon["DBS_TNS"];
|
||||
|
||||
$net->loginDbServer($dataCon["DBS_USERNAME"], $dataCon["DBS_PASSWORD"]);
|
||||
|
||||
if ($net->errno == 0) {
|
||||
$arrayServerData = array("connectionType" => $dataCon["DBS_CONNECTION_TYPE"], "tns" => $dataCon["DBS_TNS"]);
|
||||
|
||||
$response = $net->tryConnectServer($dataCon["DBS_TYPE"], $arrayServerData);
|
||||
|
||||
if ($response->status == "SUCCESS") {
|
||||
$response = $net->tryOpenDataBase($dataCon["DBS_TYPE"], $arrayServerData);
|
||||
|
||||
if ($response->status != "SUCCESS") {
|
||||
if ($returnArray) {
|
||||
$respTest["0"]["error"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error;
|
||||
} else {
|
||||
$resp["message"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error;
|
||||
|
||||
//Return
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($returnArray) {
|
||||
$respTest["0"]["error"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error;
|
||||
} else {
|
||||
$resp["message"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error;
|
||||
|
||||
//Return
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($returnArray) {
|
||||
$respTest["0"]["error"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error;
|
||||
} else {
|
||||
$resp["message"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error;
|
||||
|
||||
//Return
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($returnArray) {
|
||||
return $respTest;
|
||||
|
||||
@@ -358,6 +358,7 @@ class Light
|
||||
case 'REPORT_TO':
|
||||
case 'BALANCED':
|
||||
case 'SELF_SERVICE':
|
||||
$taskAss = array();
|
||||
$taskAss['taskId'] = $aValues['NEXT_TASK']['TAS_UID'];
|
||||
$taskAss['taskName'] = $aValues['NEXT_TASK']['TAS_TITLE'];
|
||||
$taskAss['taskAssignType'] = $aValues['NEXT_TASK']['TAS_ASSIGN_TYPE'];
|
||||
@@ -371,6 +372,7 @@ class Light
|
||||
$response[] = $taskAss;
|
||||
break;
|
||||
case 'MANUAL':
|
||||
$manual = array();
|
||||
$manual['taskId'] = $aValues['NEXT_TASK']['TAS_UID'];
|
||||
$manual['taskName'] = $aValues['NEXT_TASK']['TAS_TITLE'];
|
||||
$manual['taskAssignType'] = $aValues['NEXT_TASK']['TAS_ASSIGN_TYPE'];
|
||||
|
||||
@@ -870,7 +870,7 @@ class Task
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$limit = 1000;
|
||||
$limit = count($aUsers) + 1;
|
||||
}
|
||||
$aUsers = $this->arrayPagination($aUsers, $start, $limit);
|
||||
return $aUsers;
|
||||
@@ -1003,7 +1003,7 @@ class Task
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$limit = 1000;
|
||||
$limit = count($aUsers) + 1;
|
||||
}
|
||||
$aUsers = $this->arrayPagination($aUsers, $start, $limit);
|
||||
return $aUsers;
|
||||
@@ -1371,7 +1371,7 @@ class Task
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$limit = 1000;
|
||||
$limit = count($aUsers) + 1;
|
||||
}
|
||||
$aUsers = $this->arrayPagination($aUsers, $start, $limit);
|
||||
return $aUsers;
|
||||
@@ -1504,7 +1504,7 @@ class Task
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$limit = 1000;
|
||||
$limit = count($aUsers) + 1;
|
||||
}
|
||||
$aUsers = $this->arrayPagination($aUsers, $start, $limit);
|
||||
return $aUsers;
|
||||
@@ -1924,7 +1924,7 @@ class Task
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$limit = 1000;
|
||||
$limit = count($aUsersGroups) + 1;
|
||||
}
|
||||
$aUsersGroups = $this->arrayPagination($aUsersGroups, $start, $limit);
|
||||
return $aUsersGroups;
|
||||
@@ -2042,7 +2042,7 @@ class Task
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$limit = 1000;
|
||||
$limit = count($aUsersGroups) + 1;
|
||||
}
|
||||
$aUsersGroups = $this->arrayPagination($aUsersGroups, $start, $limit);
|
||||
return $aUsersGroups;
|
||||
|
||||
@@ -62,7 +62,6 @@ class DataBaseConnection extends Api
|
||||
* @param string $dbs_server {@from body} {@required true}
|
||||
* @param string $dbs_database_name {@from body} {@required true}
|
||||
* @param string $dbs_username {@from body}
|
||||
* @param string $dbs_port {@from body} {@type float}
|
||||
* @param string $dbs_encode {@from body} {@required true}
|
||||
* @param string $dbs_password {@from body}
|
||||
* @param string $dbs_description {@from body}
|
||||
@@ -80,7 +79,6 @@ class DataBaseConnection extends Api
|
||||
$dbs_server,
|
||||
$dbs_database_name,
|
||||
$dbs_username,
|
||||
$dbs_port,
|
||||
$dbs_encode,
|
||||
$dbs_password = '',
|
||||
$dbs_description = ''
|
||||
@@ -103,7 +101,6 @@ class DataBaseConnection extends Api
|
||||
* @param string $dbs_server {@from body} {@required true}
|
||||
* @param string $dbs_database_name {@from body} {@required true}
|
||||
* @param string $dbs_username {@from body}
|
||||
* @param string $dbs_port {@from body} {@type float}
|
||||
* @param string $dbs_encode {@from body} {@required true}
|
||||
* @param string $dbs_password {@from body}
|
||||
* @param string $dbs_description {@from body}
|
||||
@@ -122,7 +119,6 @@ class DataBaseConnection extends Api
|
||||
$dbs_server,
|
||||
$dbs_database_name,
|
||||
$dbs_username,
|
||||
$dbs_port,
|
||||
$dbs_encode,
|
||||
$dbs_password = '',
|
||||
$dbs_description = ''
|
||||
@@ -145,7 +141,6 @@ class DataBaseConnection extends Api
|
||||
* @param string $dbs_server {@from body} {@required true}
|
||||
* @param string $dbs_database_name {@from body} {@required true}
|
||||
* @param string $dbs_username {@from body}
|
||||
* @param string $dbs_port {@from body} {@type float}
|
||||
* @param string $dbs_encode {@from body} {@required true}
|
||||
* @param string $dbs_password {@from body}
|
||||
* @param string $dbs_description {@from body}
|
||||
@@ -164,7 +159,6 @@ class DataBaseConnection extends Api
|
||||
$dbs_server,
|
||||
$dbs_database_name,
|
||||
$dbs_username,
|
||||
$dbs_port,
|
||||
$dbs_encode,
|
||||
$dbs_password = '',
|
||||
$dbs_description = ''
|
||||
|
||||
Reference in New Issue
Block a user