mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit 47e1f3b774156abe4f7f494a5726f8de6adaa785
parent 2dac6846b174a24d209644fa631a5782b22a4c02
Author: markseu <mark2011@mayberg.se>
Date:   Sat, 11 Jun 2022 12:17:34 +0200

Refactored code

Diffstat:
Msystem/extensions/command.php | 6+++---
Msystem/extensions/core.php | 4++--
Msystem/extensions/update-current.ini | 8++++----
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/system/extensions/command.php b/system/extensions/command.php @@ -2,7 +2,7 @@ // Command extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/command class YellowCommand { - const VERSION = "0.8.40"; + const VERSION = "0.8.41"; public $yellow; // access to API public $files; // number of files public $links; // number of links @@ -499,8 +499,8 @@ class YellowCommand { // Return progress in percent public function getProgressPercent($now, $total, $increments, $max) { - $percent = intval(($max / $total) * $now); - if ($increments>1) $percent = intval($percent / $increments) * $increments; + $percent = intval(($max/$total) * $now); + if ($increments>1) $percent = intval($percent/$increments) * $increments; return min($max, $percent); } diff --git a/system/extensions/core.php b/system/extensions/core.php @@ -2,7 +2,7 @@ // Core extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/core class YellowCore { - const VERSION = "0.8.84"; + const VERSION = "0.8.85"; const RELEASE = "0.8.20"; public $page; // current page public $content; // content files @@ -1832,7 +1832,7 @@ class YellowLanguage { // Return human readable date, relative to today public function getDateRelative($timestamp, $format, $daysLimit, $language = "") { $timeDifference = time() - $timestamp; - $days = abs(intval($timeDifference / 86400)); + $days = abs(intval($timeDifference/86400)); $key = $timeDifference>=0 ? "coreDatePast" : "coreDateFuture"; $tokens = preg_split("/\s*,\s*/", $this->getText($key, $language)); if (count($tokens)>=8) { diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini @@ -11,21 +11,21 @@ Tag: feature system/extensions/bundle.php: bundle.php, create, update Extension: Command -Version: 0.8.40 +Version: 0.8.41 Description: Command line of the website. DocumentationUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/command DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/command.zip -Published: 2022-05-03 12:12:57 +Published: 2022-06-11 12:13:10 Developer: Datenstrom Tag: feature system/extensions/command.php: command.php, create, update Extension: Core -Version: 0.8.84 +Version: 0.8.85 Description: Core functionality of the website. DocumentationUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/core DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/core.zip -Published: 2022-06-03 15:57:48 +Published: 2022-06-11 12:13:33 Developer: Datenstrom Tag: feature system/extensions/core.php: core.php, create, update