Skip to content

Commit

Permalink
Fix upgrade_33() table name
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Feb 7, 2023
1 parent bfd1799 commit fe9bb2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions upgrade.php
Expand Up @@ -1291,9 +1291,10 @@ function upgrade_33()

function upgrade_34(){
global $xerte_toolkits_site;
$res = db_query_one("SELECT admin_password FROM toolkits_data.sitedetails");
$table = table_by_key('sitedetails');
$res = db_query_one("SELECT admin_password FROM $table");
if (strlen($res['admin_password']) != 64) {
db_query("UPDATE {$xerte_toolkits_site->database_table_prefix}sitedetails SET admin_password = ?", array(hash('sha256', $res['admin_password'])));
db_query("UPDATE $table SET admin_password = ?", array(hash('sha256', $res['admin_password'])));
}
return "hashed password if needed";
}
Expand Down

0 comments on commit fe9bb2c

Please sign in to comment.