mikuli.cz

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

commit b27ed6825a8c48a124982f7fa791197e210a7b96
parent 789842a0fc971aeb67262a13802de6ea10cd93ee
Author: markseu <mark2011@mayberg.se>
Date:   Sun, 18 Mar 2018 00:00:35 +0100

Updated plugins, snow remix

Diffstat:
Msystem/plugins/command.php | 1-
Msystem/plugins/core.php | 7+++----
2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/system/plugins/command.php b/system/plugins/command.php @@ -316,7 +316,6 @@ class YellowCommand { $serverVersion = $this->yellow->toolbox->getServerVersion(); echo "Datenstrom Yellow ".YellowCore::VERSION.", PHP ".PHP_VERSION.", $serverVersion\n"; - list($command) = $args; list($statusCode, $dataCurrent) = $this->getSoftwareVersion(); list($statusCode, $dataLatest) = $this->getSoftwareVersion(true); foreach($dataCurrent as $key=>$value) diff --git a/system/plugins/core.php b/system/plugins/core.php @@ -3143,10 +3143,9 @@ class YellowToolbox // Return lines from text string, including newline function getTextLines($text) { - $lines = array(); - $split = preg_split("/(\R)/u", $text, -1, PREG_SPLIT_DELIM_CAPTURE); - for($i=0; $i<count($split)-1; $i+=2) array_push($lines, $split[$i].$split[$i+1]); - if($split[$i]!="") array_push($lines, $split[$i]."\n"); + $lines = preg_split("/\n/", $text); + foreach($lines as &$line) $line = $line."\n"; + if(strempty($text) || substru($text, -1, 1)=="\n") array_pop($lines); return $lines; }