From 8e5b0ff13ee15856ec39ec395e904c7b7cf581ee Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Tue, 5 Dec 2023 15:59:26 +0700 Subject: [PATCH] Revert "Replaced some time() with TIMENOW constant (#1174)" This reverts commit ffd2866f11ec49ebe8654b864d007090792b7f10. --- src/Legacy/Attach.php | 2 +- src/Sitemap.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Legacy/Attach.php b/src/Legacy/Attach.php index 0e7ecc3cf..6e817000e 100644 --- a/src/Legacy/Attach.php +++ b/src/Legacy/Attach.php @@ -847,7 +847,7 @@ class Attach $this->attach_filename = preg_replace('#([\xC2\xC3])([\x80-\xBF])#', 'chr(ord(\'$1\')<<6&0xC0|ord(\'$2\')&0x3F)', $this->attach_filename); $this->attach_filename = rawurlencode($this->attach_filename); $this->attach_filename = preg_replace("/(%[0-9A-F]{1,2})/i", '', $this->attach_filename); - $this->attach_filename = trim($this->attach_filename . '_' . make_rand_str(13)); + $this->attach_filename = trim($this->attach_filename . '_' .make_rand_str(13)); } $this->attach_filename = str_replace(['&', '&', ' '], '_', $this->attach_filename); $this->attach_filename = str_replace('php', '_php_', $this->attach_filename); diff --git a/src/Sitemap.php b/src/Sitemap.php index 54fd44654..7f81b1063 100644 --- a/src/Sitemap.php +++ b/src/Sitemap.php @@ -120,7 +120,7 @@ class Sitemap $sitemap = new STM(SITEMAP_DIR . '/sitemap_dynamic.xml'); foreach ($this->getForumUrls() as $forum) { - $sitemap->addItem(make_url($forum['url']), TIMENOW, STM::HOURLY, 0.7); + $sitemap->addItem(make_url($forum['url']), time(), STM::HOURLY, 0.7); } foreach ($this->getTopicUrls() as $topic) { @@ -144,7 +144,7 @@ class Sitemap $staticSitemap = new STM(SITEMAP_DIR . '/sitemap_static.xml'); foreach ($this->getStaticUrls() as $url) { - $staticSitemap->addItem($url['url'], TIMENOW, STM::WEEKLY, 0.5); + $staticSitemap->addItem($url['url'], time(), STM::WEEKLY, 0.5); } $staticSitemap->write();