mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Replaced some time() with TIMENOW constant (#1174)
This commit is contained in:
parent
961bbd6306
commit
ffd2866f11
2 changed files with 3 additions and 3 deletions
|
@ -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 = 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 = rawurlencode($this->attach_filename);
|
||||||
$this->attach_filename = preg_replace("/(%[0-9A-F]{1,2})/i", '', $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(['&', '&', ' '], '_', $this->attach_filename);
|
||||||
$this->attach_filename = str_replace('php', '_php_', $this->attach_filename);
|
$this->attach_filename = str_replace('php', '_php_', $this->attach_filename);
|
||||||
|
|
|
@ -120,7 +120,7 @@ class Sitemap
|
||||||
$sitemap = new STM(SITEMAP_DIR . '/sitemap_dynamic.xml');
|
$sitemap = new STM(SITEMAP_DIR . '/sitemap_dynamic.xml');
|
||||||
|
|
||||||
foreach ($this->getForumUrls() as $forum) {
|
foreach ($this->getForumUrls() as $forum) {
|
||||||
$sitemap->addItem(make_url($forum['url']), time(), STM::HOURLY, 0.7);
|
$sitemap->addItem(make_url($forum['url']), TIMENOW, STM::HOURLY, 0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->getTopicUrls() as $topic) {
|
foreach ($this->getTopicUrls() as $topic) {
|
||||||
|
@ -144,7 +144,7 @@ class Sitemap
|
||||||
$staticSitemap = new STM(SITEMAP_DIR . '/sitemap_static.xml');
|
$staticSitemap = new STM(SITEMAP_DIR . '/sitemap_static.xml');
|
||||||
|
|
||||||
foreach ($this->getStaticUrls() as $url) {
|
foreach ($this->getStaticUrls() as $url) {
|
||||||
$staticSitemap->addItem($url['url'], time(), STM::WEEKLY, 0.5);
|
$staticSitemap->addItem($url['url'], TIMENOW, STM::WEEKLY, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
$staticSitemap->write();
|
$staticSitemap->write();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue