Fix obscur deletion in admin panel; add Whirlpool hash
This commit is contained in:
parent
5b2b4265a4
commit
0774eb7009
@ -2,7 +2,7 @@
|
||||
|
||||
if(!defined('ONYX')) exit;
|
||||
|
||||
$template->assign("fortyp", array("raw" => "RAW", "sha1" => "SHA-1", "md5" => "MD5", "sha224" => "SHA-224", "sha256" => "SHA-256", "sha384" => "SHA-384", "sha512" => "SHA-512"));
|
||||
$template->assign("fortyp", array("raw" => "RAW", "sha1" => "SHA-1", "md5" => "MD5", "sha224" => "SHA-224", "sha256" => "SHA-256", "sha384" => "SHA-384", "sha512" => "SHA-512", "whirlpool" => "Whirlpool"));
|
||||
|
||||
$p = $out[0];
|
||||
|
||||
|
@ -301,8 +301,11 @@ class Exercice
|
||||
|
||||
function flush_keys()
|
||||
{
|
||||
$id = $this->id;
|
||||
|
||||
$db = new BDD();
|
||||
$db->query("DELETE FROM exercice_keys WHERE id_exercice = ".intval($this->id));
|
||||
$db->escape($id);
|
||||
$db->query("DELETE FROM exercice_keys WHERE id_exercice = '$id'");
|
||||
$db->deconnexion();
|
||||
|
||||
$this->keys = array();
|
||||
@ -312,9 +315,9 @@ class Exercice
|
||||
{
|
||||
if ($format == "raw")
|
||||
{
|
||||
$this->add_key("sha1", hash("sha1", $value));
|
||||
$this->add_key("sha256", hash("sha256", $value));
|
||||
$this->add_key("sha512", hash("sha512", $value));
|
||||
$this->add_key("md5", hash("md5", $value));
|
||||
$this->add_key("whirlpool", hash("whirlpool", $value));
|
||||
}
|
||||
else
|
||||
$this->keys[] = array(
|
||||
|
Loading…
Reference in New Issue
Block a user