@@ -228,6 +228,8 @@ try {
|
||||
|
||||
echo 'Done!' . "\n";
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . "\n" );
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,9 @@ try {
|
||||
break;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . "\n" );
|
||||
|
||||
eprintln('Problem in workspace: ' . $workspace . ' it was omitted.', 'red');
|
||||
}
|
||||
@@ -325,7 +327,9 @@ try {
|
||||
unlink(PATH_CORE . 'config' . PATH_SEP . '_databases_.php');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . "\n" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -59,10 +59,10 @@ function run_create_translation($args, $opts)
|
||||
CLI::logging("Updating labels Mafe ...\n");
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
echo "Updating labels for workspace " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
G::outRes( "Updating labels for workspace " . pakeColor::colorize($workspace->name, "INFO") . "\n" );
|
||||
$translation->generateTransaltionMafe($lang);
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading labels for workspace " . CLI::info($workspace->name) . ": " . CLI::error(G::getErrorMessage($e)) . "\n";
|
||||
G::outRes( "Errors upgrading labels for workspace " . CLI::info($workspace->name) . ": " . CLI::error(G::getErrorMessage($e)) . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -321,7 +321,7 @@ function run_workspace_upgrade($args, $opts) {
|
||||
$workspace->upgrade($first, false, $workspace->name, $lang);
|
||||
$first = false;
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,11 +335,11 @@ function run_translation_upgrade($args, $opts) {
|
||||
$first = true;
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
echo "Upgrading translation for " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
G::outRes( "Upgrading translation for " . pakeColor::colorize($workspace->name, "INFO") . "\n" );
|
||||
$workspace->upgradeTranslation($first);
|
||||
$first = false;
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading translation of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "Errors upgrading translation of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -353,14 +353,13 @@ function run_cacheview_upgrade($args, $opts) {
|
||||
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
echo "Upgrading cache view for " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
G::outRes( "Upgrading cache view for " . pakeColor::colorize($workspace->name, "INFO") . "\n" );
|
||||
$workspace->upgradeCacheView(true, false, $lang);
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading cache view of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "Errors upgrading cache view of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function run_plugins_database_upgrade($args, $opts) {
|
||||
$workspaces = get_workspaces_from_args($args);
|
||||
foreach ($workspaces as $workspace) {
|
||||
@@ -441,7 +440,7 @@ function database_upgrade($command, $args) {
|
||||
echo "> OK\n";
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -673,10 +672,10 @@ function run_database_generate_self_service_by_value($args, $opts)
|
||||
$workspace = $value;
|
||||
|
||||
try {
|
||||
echo "Generating the table \"self-service by value\" for " . pakeColor::colorize($workspace->name, "INFO") . "\n";
|
||||
G::outRes( "Generating the table \"self-service by value\" for " . pakeColor::colorize($workspace->name, "INFO") . "\n" );
|
||||
$workspace->appAssignSelfServiceValueTableGenerateData();
|
||||
} catch (Exception $e) {
|
||||
echo "Errors generating the table \"self-service by value\" of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "Errors generating the table \"self-service by value\" of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -684,7 +683,7 @@ function run_database_generate_self_service_by_value($args, $opts)
|
||||
|
||||
echo "Done!\n";
|
||||
} catch (Exception $e) {
|
||||
echo CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,7 +753,7 @@ function run_migrate_itee_to_dummytask($args, $opts){
|
||||
$ws = new workspaceTools($workspace->name);
|
||||
$res = $ws->migrateIteeToDummytask($workspace->name);
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -813,7 +812,7 @@ function run_check_workspace_disabled_code($args, $opts)
|
||||
echo "The workspace it's OK\n\n";
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo "Errors to check disabled code: " . CLI::error($e->getMessage()) . "\n\n";
|
||||
G::outRes( "Errors to check disabled code: " . CLI::error($e->getMessage()) . "\n\n" );
|
||||
}
|
||||
|
||||
$workspace->close();
|
||||
@@ -821,7 +820,7 @@ function run_check_workspace_disabled_code($args, $opts)
|
||||
|
||||
echo "Done!\n";
|
||||
} catch (Exception $e) {
|
||||
echo CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,7 +837,7 @@ function migrate_new_cases_lists($command, $args, $opts) {
|
||||
$workspace->migrateList($workspace->name, true, $lang);
|
||||
echo "> List tables are done\n";
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -854,7 +853,7 @@ function migrate_counters($command, $args) {
|
||||
|
||||
echo "> Counters are done\n";
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -872,7 +871,7 @@ function migrate_list_unassigned($command, $args, $opts) {
|
||||
$workspace->regenerateListUnassigned();
|
||||
echo "> Unassigned List is done\n";
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
G::outRes( "> Error: ".CLI::error($e->getMessage()) . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,9 @@ if (! defined ('SYS_SYS')) {
|
||||
processWorkspace ();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
echo $e->getMessage ();
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
eprintln ("Problem in workspace: " . $sObject . ' it was omitted.', 'red');
|
||||
}
|
||||
eprintln ();
|
||||
|
||||
@@ -173,7 +173,9 @@ class Dashboard extends Controller
|
||||
//G::pr($this->pmDashlet->setup( $width ));die;
|
||||
} catch (Exception $error) {
|
||||
//ToDo: Show the error message
|
||||
echo $error->getMessage();
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($error, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -345,8 +345,6 @@ switch ($action) {
|
||||
}
|
||||
break;
|
||||
case 'showEncodes':
|
||||
//G::LoadThirdParty( 'pear/json', 'class.json' );
|
||||
//$oJSON =
|
||||
G::LoadSystem('inputfilter');
|
||||
$filter = new InputFilter();
|
||||
$engine = $_POST['engine'];
|
||||
@@ -354,10 +352,10 @@ switch ($action) {
|
||||
if ($engine != "0") {
|
||||
$dbs = new dbConnections();
|
||||
$var = Bootstrap::json_encode($dbs->getEncondeList($filter->xssFilterHard($engine)));
|
||||
echo $var;
|
||||
G::outRes($var);
|
||||
|
||||
} else {
|
||||
echo '[["0","..."]]';
|
||||
G::outRes('[["0","..."]]');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,10 @@ if (isset( $_REQUEST['action'] )) {
|
||||
$varEcho = '{success: true}';
|
||||
G::outRes( $varEcho );
|
||||
} catch (Exception $ex) {
|
||||
echo '{success: false, error: ' . $ex->getMessage() . '}';
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($ex, $token);
|
||||
$resJson = '{success: false, error: ' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '}';
|
||||
G::outRes( $resJson );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -993,6 +993,9 @@ try {
|
||||
die($sOutput);
|
||||
}
|
||||
} catch (Exception $oException) {
|
||||
die($oException->getMessage() . "\n" . $oException->getTraceAsString());
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($oException, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,9 @@ if (isset( $_FILES ) && $_FILES["ATTACH_FILE"]["error"] == 0) {
|
||||
}
|
||||
//End plugin
|
||||
} catch (Exception $e) {
|
||||
print ($e->getMessage()) ;
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,12 +92,12 @@ try {
|
||||
switch ((int) $_POST['TU_RELATION']) {
|
||||
case 1:
|
||||
$resh = htmlentities($oTasks->assignUser($_POST['TAS_UID'], $_POST['USR_UID'], $_POST['TU_TYPE']), ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
echo $res;
|
||||
G::outRes($resh);
|
||||
G::auditlog("AssignUserTask","Assign a User to a Task -> ".$_POST['TAS_UID'].' User UID -> '.$_POST['USR_UID']);
|
||||
break;
|
||||
case 2:
|
||||
$resh = htmlentities($oTasks->assignGroup($_POST['TAS_UID'], $_POST['USR_UID'], $_POST['TU_TYPE']), ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
echo $resh;
|
||||
G::outRes($resh);
|
||||
G::auditlog("AssignGroupTask","Assign a Group to a Task -> ".$_POST['TAS_UID'].' User UID -> '.$_POST['USR_UID']);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user