I solved issues [April 18]

This commit is contained in:
Paula V. Quispe
2015-04-21 13:42:09 -04:00
parent e374f7a550
commit 0071e43de7
6 changed files with 24 additions and 15 deletions

View File

@@ -98,7 +98,7 @@ class Upgrade
$installedMD5 = "";
} else {
$time = microtime(1);
$installedMD5 = md5_file($installedFile);
$installedMD5 = G::encryptFileOld($installedFile);
$checksumTime += microtime(1) - $time;
}
$archiveMD5 = $checksum;

View File

@@ -260,7 +260,7 @@ class System
continue;
}
if (file_exists( realpath( $filename ) )) {
if (strcmp( $checksum, md5_file( realpath( $filename ) ) ) != 0) {
if (strcmp( $checksum, G::encryptFileOld( realpath( $filename ) ) ) != 0) {
$result['diff'][] = $filename;
}
} else {
@@ -542,7 +542,7 @@ class System
$file = PATH_TRUNK . trim( $line[2] );
if (is_readable( $file )) {
$size = sprintf( "%07d", filesize( $file ) );
$checksum = sprintf( "%010u", crc32( file_get_contents( $file ) ) );
$checksum = sprintf( "%010u", G::encryptCrc32( file_get_contents( $file ) ) );
if (! ($line[0] == $size && $line[1] == $checksum) && substr( $file, - 4 ) != '.xml') {
$distinctFiles .= $file . "\n";
$distinct ++;

View File

@@ -840,15 +840,15 @@ class Installer extends Controller
$query = sprintf( "USE %s;", $wf_workpace );
$this->mysqlQuery( $query );
$query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, md5( $adminPassword ) );
$query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptOld( $adminPassword ) );
$this->mysqlQuery( $query );
$query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, md5( $adminPassword ) );
$query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptOld( $adminPassword ) );
$this->mysqlQuery( $query );
// Write the paths_installed.php file (contains all the information configured so far)
if (! file_exists( FILE_PATHS_INSTALLED )) {
$sh = md5( filemtime( PATH_GULLIVER . '/class.g.php' ) );
$sh = G::encryptOld( filemtime( PATH_GULLIVER . '/class.g.php' ) );
$h = G::encrypt( $db_hostname . $sh . $db_username . $sh . $db_password, $sh );
$dbText = "<?php\n";
$dbText .= sprintf( " define('PATH_DATA', '%s');\n", $pathShared );
@@ -1152,18 +1152,18 @@ class Installer extends Controller
$query = sprintf( "USE %s;", $wf );
$this->mssqlQuery( $query );
$query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, md5( $adminPassword ) );
$query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptOld( $adminPassword ) );
$this->mssqlQuery( $query );
$query = sprintf( "USE %s;", $wf );
$this->mssqlQuery( $query );
$query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, md5( $adminPassword ) );
$query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptOld( $adminPassword ) );
$this->mssqlQuery( $query );
// Write the paths_installed.php file (contains all the information configured so far)
if (! file_exists( FILE_PATHS_INSTALLED )) {
$sh = md5( filemtime( PATH_GULLIVER . '/class.g.php' ) );
$sh = G::encryptOld( filemtime( PATH_GULLIVER . '/class.g.php' ) );
$h = G::encrypt( $db_hostname . $sh . $db_username . $sh . $db_password . '1', $sh );
$dbText = "<?php\n";
$dbText .= sprintf( " define ('PATH_DATA', '%s' );\n", $pathShared );