Kaynağa Gözat

+ DBG ant command for Admin

Piotr Labudda 6 yıl önce
ebeveyn
işleme
e8c0778c69
1 değiştirilmiş dosya ile 8 ekleme ve 0 silme
  1. 8 0
      SE/se-lib/Route/UrlAction/Ant.php

+ 8 - 0
SE/se-lib/Route/UrlAction/Ant.php

@@ -166,6 +166,14 @@ class Route_UrlAction_Ant extends Route_Ant {// @doc @see Route_Ant
         'MAVEN_OPTS="-Xms256m -Xmx512m"' . "\n" .
         $cmd;
       $useShellExec = true;
+      if (User::isAdmin()) {
+        echo UI::h('details', [], [
+          UI::h('summary', [ 'style' => "padding:3px 8px;border:1px solid #ccc;background-color:#282c34;color:#de6b74;font-size:small" ], "DBG: command"),
+          UI::h('div', [ 'style' => "padding:12px; background:#282c34;" ], [
+            UI::h('pre', [], $cmd),
+          ]),
+        ]);
+      }
       if ($useShellExec) $out = shell_exec($cmd);
       else V::exec($cmd, $out, $ret);
       DBG::log([ 'msg'=>"cmd and returns({$ret})", 'output'=>$out, 'cmd'=>str_replace(APP_PATH_ROOT, 'SE', $cmd) ]);