aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/Auth.php7
-rw-r--r--app/Models/EntryDAO.php4
2 files changed, 3 insertions, 8 deletions
diff --git a/app/Models/Auth.php b/app/Models/Auth.php
index 6d079a01f..b7fb0e6d6 100644
--- a/app/Models/Auth.php
+++ b/app/Models/Auth.php
@@ -219,10 +219,6 @@ class FreshRSS_FormAuth {
return false;
}
- if (!function_exists('password_verify')) {
- include_once(LIB_PATH . '/password_compat.php');
- }
-
return password_verify($nonce . $hash, $challenge);
}
@@ -283,8 +279,7 @@ class FreshRSS_FormAuth {
$cookie_duration = empty($limits['cookie_duration']) ? 2592000 : $limits['cookie_duration'];
$oldest = time() - $cookie_duration;
foreach (new DirectoryIterator(DATA_PATH . '/tokens/') as $file_info) {
- // $extension = $file_info->getExtension(); doesn't work in PHP < 5.3.7
- $extension = pathinfo($file_info->getFilename(), PATHINFO_EXTENSION);
+ $extension = $file_info->getExtension();
if ($extension === 'txt' && $file_info->getMTime() < $oldest) {
@unlink($file_info->getPathname());
}
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index b47cd55ad..1b2786a6a 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -191,7 +191,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
if ($this->hasNativeHex()) {
$this->addEntryPrepared->bindParam(':hash', $valuesTmp['hash']);
} else {
- $valuesTmp['hashBin'] = pack('H*', $valuesTmp['hash']); //hex2bin() is PHP5.4+
+ $valuesTmp['hashBin'] = hex2bin($valuesTmp['hash']);
$this->addEntryPrepared->bindParam(':hash', $valuesTmp['hashBin']);
}
}
@@ -273,7 +273,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
if ($this->hasNativeHex()) {
$this->updateEntryPrepared->bindParam(':hash', $valuesTmp['hash']);
} else {
- $valuesTmp['hashBin'] = pack('H*', $valuesTmp['hash']); //hex2bin() is PHP5.4+
+ $valuesTmp['hashBin'] = hex2bin($valuesTmp['hash']);
$this->updateEntryPrepared->bindParam(':hash', $valuesTmp['hashBin']);
}