commit 864ce8ab442a27f7448e965ba5d71c9c0ac8714b
parent 77cf31de60a3392ce5241dc5271e67427a0b0de2
Author: markseu <mark2011@mayberg.se>
Date: Fri, 14 Nov 2014 15:28:50 +0100
Hello command line (version display)
Diffstat:
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/system/core/core-commandline.php b/system/core/core-commandline.php
@@ -5,7 +5,7 @@
// Command line core plugin
class YellowCommandline
{
- const Version = "0.4.2";
+ const Version = "0.4.3";
var $yellow; //access to API
var $content; //number of content pages
var $media; //number of media files
@@ -65,7 +65,7 @@ class YellowCommandline
function versionCommand()
{
echo "Yellow ".Yellow::Version."\n";
- foreach($this->yellow->plugins->plugins as $key=>$value) echo "$value[class] $value[version]\n";
+ foreach($this->getPluginVersion() as $line) echo "$line\n";
return 200;
}
@@ -419,6 +419,15 @@ class YellowCommandline
return $data;
}
+ // Return plugin version
+ function getPluginVersion()
+ {
+ $data = array();
+ foreach($this->yellow->plugins->plugins as $key=>$value) $data[$key] = "$value[class] $value[version]";
+ usort($data, strnatcasecmp);
+ return $data;
+ }
+
// Check if directory contains Yellow files
function isYellowDirectory($path)
{