diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index 705d643dd..6eed432f7 100755 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -501,7 +501,7 @@ class workspaceTools $filesDir = $doclevel[$length - 1]; if (is_dir(PATH_DOCUMENT) && is_writable($filesDir)) { - CLI::logging("Error:" . PATH_DOCUMENT . " is not writable... please check the su permissions.\n"); + CLI::logging(CLI::error("Error:" . PATH_DOCUMENT . " is not writable... please check the su permissions.\n")); return; } @@ -511,7 +511,7 @@ class workspaceTools $dirslength = sizeof($directory); if (! @chdir(PATH_DOCUMENT)) { - CLI::logging("Cannot use Document directory. The upgrade must be done as root.\n"); + CLI::logging(CLI::error("Cannot use Document directory. The upgrade must be done as root.\n")); return; } @@ -535,7 +535,7 @@ class workspaceTools G::rm_dir($UIdDir); rmdir($UIdDir);//remove the diretory itself, G::rm_dir cannot do it } else { - CLI::logging("Error: Failure at coping from $UIdDir...\n"); + CLI::logging(CLI::error("Error: Failure at coping from $UIdDir...\n")); } } else { CLI::logging("$UIdDir is empty, removing it\n"); @@ -562,7 +562,7 @@ class workspaceTools if (copy($black . $goalFile, $black . $newpattern[0] . '/' . $newpattern[1])) { unlink($file[$index]); } else { - CLI::logging("Error: Failure at copy $file[$index] files...\n"); + CLI::logging(CLI::error("Error: Failure at copy $file[$index] files...\n")); } } } @@ -571,11 +571,11 @@ class workspaceTools $this->initPropel(true); G::LoadClass("configuration"); $conf = new Configurations(); - if ($conf->exists("ENVIRONMENT_SETTINGS")) { + if ($conf->exists("ENVIRONMENT_SETTINGS")) { $conf->setDirectoryStructureVer(2); - CLI::logging("Please notice Version Directory Structure is 2 now.\n"); + CLI::logging(CLI::info("Version Directory Structure is 2 now.\n")); } else { - CLI::logging("Error: Issue found at try to use ENVIRONMENT_SETTINGS row.\n"); + CLI::logging(CLI::error("Error: found at try to use ENVIRONMENT_SETTINGS row.\n")); return; } } diff --git a/workflow/engine/classes/model/Translation.php b/workflow/engine/classes/model/Translation.php index f748c7ed9..236300d48 100755 --- a/workflow/engine/classes/model/Translation.php +++ b/workflow/engine/classes/model/Translation.php @@ -177,10 +177,10 @@ class Translation extends BaseTranslation //$json = new Services_JSON(); DEPRECATED $f = fopen( $cacheFileJS, 'w' ); - if ($f==false) { - echo "Error: Cannot write into cachefilejs: $cacheFileJS\n"; + if ($f == false) { + error_log("Error: Cannot write into cachefilejs: $cacheFileJS\n"); } else { - fwrite( $f, "var G_STRINGS =" . Bootstrap::json_encode( $translationJS ) . ";\n" ); + fwrite( $f, "var G_STRINGS =" . Bootstrap::json_encode( $translationJS ) . ";\n"); fclose( $f ); } @@ -413,7 +413,6 @@ class Translation extends BaseTranslation if (! file_exists( $filePath )) { //the transaltions table file doesn't exist, then build it - if (! is_dir( dirname( $this->envFilePath ) )) { G::mk_dir( dirname( $this->envFilePath ) ); } @@ -422,7 +421,7 @@ class Translation extends BaseTranslation $params = self::getInfoFromPOFile( $basePOFile ); $this->addTranslationEnvironment( $params['LOCALE'], $params['HEADERS'], $params['COUNT'] ); - //getting more lanuguage translations + //getting more language translations $files = glob( $translationsPath . "*.po" ); foreach ($files as $file) { $params = self::getInfoFromPOFile( $file ); diff --git a/workflow/engine/methods/cases/cases_ShowDocument.php b/workflow/engine/methods/cases/cases_ShowDocument.php index 17f0b4fc5..3ff48bf16 100755 --- a/workflow/engine/methods/cases/cases_ShowDocument.php +++ b/workflow/engine/methods/cases/cases_ShowDocument.php @@ -71,7 +71,7 @@ if (file_exists( $realPath )) { } if (! $sw_file_exists) { - $error_message = "'" .$realPath." " .$realPath1." ". $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' ); + $error_message = G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' ); if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) { $res['success'] = 'failure'; $res['message'] = $error_message;