Merge pull request #1701 from ralpheav/master

BUG 8665 Extra: Changing log messages.
This commit is contained in:
julceslauhub
2013-05-08 08:14:22 -07:00
3 changed files with 12 additions and 13 deletions

View File

@@ -501,7 +501,7 @@ class workspaceTools
$filesDir = $doclevel[$length - 1]; $filesDir = $doclevel[$length - 1];
if (is_dir(PATH_DOCUMENT) && is_writable($filesDir)) { 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; return;
} }
@@ -511,7 +511,7 @@ class workspaceTools
$dirslength = sizeof($directory); $dirslength = sizeof($directory);
if (! @chdir(PATH_DOCUMENT)) { 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; return;
} }
@@ -535,7 +535,7 @@ class workspaceTools
G::rm_dir($UIdDir); G::rm_dir($UIdDir);
rmdir($UIdDir);//remove the diretory itself, G::rm_dir cannot do it rmdir($UIdDir);//remove the diretory itself, G::rm_dir cannot do it
} else { } else {
CLI::logging("Error: Failure at coping from $UIdDir...\n"); CLI::logging(CLI::error("Error: Failure at coping from $UIdDir...\n"));
} }
} else { } else {
CLI::logging("$UIdDir is empty, removing it\n"); CLI::logging("$UIdDir is empty, removing it\n");
@@ -562,7 +562,7 @@ class workspaceTools
if (copy($black . $goalFile, $black . $newpattern[0] . '/' . $newpattern[1])) { if (copy($black . $goalFile, $black . $newpattern[0] . '/' . $newpattern[1])) {
unlink($file[$index]); unlink($file[$index]);
} else { } 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); $this->initPropel(true);
G::LoadClass("configuration"); G::LoadClass("configuration");
$conf = new Configurations(); $conf = new Configurations();
if ($conf->exists("ENVIRONMENT_SETTINGS")) { if ($conf->exists("ENVIRONMENT_SETTINGS")) {
$conf->setDirectoryStructureVer(2); $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 { } 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; return;
} }
} }

View File

@@ -177,10 +177,10 @@ class Translation extends BaseTranslation
//$json = new Services_JSON(); DEPRECATED //$json = new Services_JSON(); DEPRECATED
$f = fopen( $cacheFileJS, 'w' ); $f = fopen( $cacheFileJS, 'w' );
if ($f==false) { if ($f == false) {
echo "Error: Cannot write into cachefilejs: $cacheFileJS\n"; error_log("Error: Cannot write into cachefilejs: $cacheFileJS\n");
} else { } else {
fwrite( $f, "var G_STRINGS =" . Bootstrap::json_encode( $translationJS ) . ";\n" ); fwrite( $f, "var G_STRINGS =" . Bootstrap::json_encode( $translationJS ) . ";\n");
fclose( $f ); fclose( $f );
} }
@@ -413,7 +413,6 @@ class Translation extends BaseTranslation
if (! file_exists( $filePath )) { if (! file_exists( $filePath )) {
//the transaltions table file doesn't exist, then build it //the transaltions table file doesn't exist, then build it
if (! is_dir( dirname( $this->envFilePath ) )) { if (! is_dir( dirname( $this->envFilePath ) )) {
G::mk_dir( dirname( $this->envFilePath ) ); G::mk_dir( dirname( $this->envFilePath ) );
} }
@@ -422,7 +421,7 @@ class Translation extends BaseTranslation
$params = self::getInfoFromPOFile( $basePOFile ); $params = self::getInfoFromPOFile( $basePOFile );
$this->addTranslationEnvironment( $params['LOCALE'], $params['HEADERS'], $params['COUNT'] ); $this->addTranslationEnvironment( $params['LOCALE'], $params['HEADERS'], $params['COUNT'] );
//getting more lanuguage translations //getting more language translations
$files = glob( $translationsPath . "*.po" ); $files = glob( $translationsPath . "*.po" );
foreach ($files as $file) { foreach ($files as $file) {
$params = self::getInfoFromPOFile( $file ); $params = self::getInfoFromPOFile( $file );

View File

@@ -71,7 +71,7 @@ if (file_exists( $realPath )) {
} }
if (! $sw_file_exists) { 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)) { if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'failure'; $res['success'] = 'failure';
$res['message'] = $error_message; $res['message'] = $error_message;