From 5f898dcc5ee244e4adbd6aa83b607c844d432fb6 Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Sun, 26 Mar 2023 14:17:22 +0200 Subject: Modernize Constants and use new constant for string 'currentUser' (#5089) * Modernize Constants and use new constant 'currentUser' * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Models/Auth.php * Update p/api/greader.php * Update p/api/greader.php * Update p/api/greader.php * Update app/Models/Context.php * Update app/Models/LogDAO.php * Update lib/Minz/Log.php * Update p/api/greader.php * Update app/layout/header.phtml * Update app/views/helpers/export/articles.phtml * Update cli/do-install.php * Remarque's from Alkarex * Remarque's from Alkarex * Refactor using new Minz_User class * Consistent naming of public constants --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- lib/Minz/Extension.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Minz/Extension.php') diff --git a/lib/Minz/Extension.php b/lib/Minz/Extension.php index a35d7d8b6..a280676c1 100644 --- a/lib/Minz/Extension.php +++ b/lib/Minz/Extension.php @@ -155,7 +155,7 @@ abstract class Minz_Extension { $file_name_url = urlencode("{$dir}/static/{$filename}"); $mtime = @filemtime("{$this->path}/static/{$filename}"); } else { - $username = Minz_Session::param('currentUser'); + $username = Minz_User::name(); $path = USERS_PATH . "/{$username}/{$this->config_key}/{$this->getName()}/{$filename}"; $file_name_url = urlencode("{$username}/{$this->config_key}/{$this->getName()}/{$filename}"); $mtime = @filemtime($path); @@ -343,7 +343,7 @@ abstract class Minz_Extension { } public function saveFile(string $filename, string $content) { - $username = Minz_Session::param('currentUser'); + $username = Minz_User::name(); $path = USERS_PATH . "/{$username}/{$this->config_key}/{$this->getName()}"; if (!file_exists($path)) { @@ -354,7 +354,7 @@ abstract class Minz_Extension { } public function removeFile(string $filename) { - $username = Minz_Session::param('currentUser'); + $username = Minz_User::name(); $path = USERS_PATH . "/{$username}/{$this->config_key}/{$this->getName()}/{$filename}"; if (file_exists($path)) { -- cgit v1.2.3