summaryrefslogtreecommitdiff
path: root/src/web/core/core.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/core/core.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/web/core/core.php b/src/web/core/core.php
index 3b23410..f1ce07e 100644
--- a/src/web/core/core.php
+++ b/src/web/core/core.php
@@ -25,7 +25,7 @@ abstract class Core {
{
if (ENVIRONMENT == 'devlopment')
return time();
- $path = PUBLIC_ROOT . '/' . $path;
+ $path = PHP_ROOT . '/' . $path;
return @filemtime($path);
}
@@ -48,7 +48,7 @@ abstract class Core {
$base = lang('base_path');
$url = "{$scheme}://{$host}{$base}{$path}";
if ($timestamp) {
- $time = @filemtime(PHP_ROOT . '/' . $path);
+ $time = Core::asset_stamp($path);
$url .= "?timestamp={$time}";
}
return $url;
@@ -60,8 +60,8 @@ abstract class Core {
*/
public static function link_js(string $path): string
{
- $stamp = Core::asset_stamp($path);
- $href = Core::get_url("public/{$path}?stamp={$stamp}");
+ $stamp = Core::asset_stamp("public/$path");
+ $href = Core::get_url("public/{$path}?timestamp={$stamp}");
return '<script src="'. $href .'"></script>';
}
@@ -71,8 +71,8 @@ abstract class Core {
*/
public static function link_css(string $path): string
{
- $stamp = Core::asset_stamp($path);
- $href = Core::get_url("public/{$path}?stamp={$stamp}");
+ $stamp = Core::asset_stamp("public/$path");
+ $href = Core::get_url("public/{$path}?timestamp={$stamp}");
return '<link rel="stylesheet" href="'. $href .'">';
}