Alex Trofimov 1 год назад
Родитель
Сommit
d82ec1266c
1 измененных файлов с 10 добавлено и 1 удалено
  1. 10 1
      scripts/manage.php

+ 10 - 1
scripts/manage.php

@@ -15,6 +15,7 @@ define('BX_DOL_CRON_EXECUTE', '1');
  */
 class BxDolManageCmd
 {
+    protected $_sVer = '1.0';
     protected $_sCmd;
     protected $_sCmdOptions;
     protected $_sPathToUna;
@@ -47,11 +48,14 @@ class BxDolManageCmd
     {
         // set neccessary options
 
-        $a = getopt('hqic:u:p:o:', $this->getOptions());
+        $a = getopt('hvqic:u:p:o:', $this->getOptions());
 
         if (isset($a['h']))
             $this->finish($this->_aReturnCodes['success']['code'], $this->getHelp());
 
+        if (isset($a['v']))
+            $this->finish($this->_aReturnCodes['success']['code'], $this->getVer());
+
         if (isset($a['q']))
             $this->_isQuiet = true;
 
@@ -92,6 +96,11 @@ class BxDolManageCmd
         return $a;
     }
 
+    protected function getVer()
+    {
+        return "UNA Manage Script v." . $this->_sVer;
+    }
+
     protected function getHelp()
     {
         $s = "Usage: php manage.php [params]\n";