Skip to content

Commit

Permalink
Update Log class calls
Browse files Browse the repository at this point in the history
  • Loading branch information
chetcuti committed Apr 21, 2017
1 parent 99a8ad3 commit 518a3f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion _includes/update.inc.php
Expand Up @@ -28,6 +28,8 @@
$current_db_version = (string) $row->db_version;
}

$previous_version = $current_db_version;

if ($current_db_version < $software_version) {

if ($current_db_version >= '1.1' && $current_db_version < '2.0022') {
Expand Down Expand Up @@ -82,7 +84,7 @@

$_SESSION['s_message_success'] .= "Your database has been upgraded<BR>";

$log->goal('upgrade');
$log->goal('upgrade', $previous_version, $software_version);

} elseif ($current_db_version > $software_version) {

Expand Down
10 changes: 5 additions & 5 deletions classes/DomainMOD/Log.php
Expand Up @@ -24,12 +24,12 @@
class Log
{

public function goal($goal)
public function goal($goal, $old_version, $new_version)
{
if ($goal == 'upgrade') {
$log_file = 'https://domainmod.org/upgraded/index.php';
} elseif ($goal == 'install') {
$log_file = 'https://domainmod.org/installed/index.php';
if ($goal == 'install') {
$log_file = 'https://domainmod.org/installed/index.php?v=' . $new_version;
} elseif ($goal == 'upgrade') {
$log_file = 'https://domainmod.org/upgraded/index.php?ov=' . $old_version . '&nv=' . $new_version;
} else {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion install/index.php
Expand Up @@ -1156,7 +1156,7 @@
$_SESSION['s_installation_mode'] = '0';
$_SESSION['s_message_success'] .= $software_title . " has been installed and you should now delete the /install/ folder<BR><BR>The default username and password are \"admin\"<BR>";

$log->goal('install');
$log->goal('install', '', $software_version);

header("Location: ../");
exit;
Expand Down

0 comments on commit 518a3f9

Please sign in to comment.