Refactored code
This commit is contained in:
parent
2dac6846b1
commit
47e1f3b774
3 changed files with 9 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue