]> git.nbdom.net Git - nb.git/commitdiff
add filters to phpinfo
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 7 Jan 2017 17:40:54 +0000 (17:40 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 7 Jan 2017 17:40:54 +0000 (17:40 +0000)
www/dbq/dbq.php

index 4eddb0318bfda4b26d6fd9f5e9c8f4974de61a2f..5a48eb48a6a1613a444bfa9a579a430b8be6f0b6 100644 (file)
@@ -532,6 +532,11 @@ class DbQ extends nb {
       $rows = [];
       $row = [];
       $section = '';
+      $p = [
+        'section' => $this->p('section',''),
+        'name' => $this->p('name',''),
+        'value' => $this->p('value',''),
+      ];
 
       foreach (explode("\n",$this->page->phpinfo()) as $line) {
 
@@ -550,6 +555,10 @@ class DbQ extends nb {
           }
 
           #debug($m);
+          if ($p['name'] and !$this->str_match($name,$p['name'])) continue;
+          if ($p['value'] and !$this->str_match($value,$p['value'])) continue;
+          if ($p['section'] and !$this->str_match($_section,$p['section'])) continue;
+
           $rows[] = [
             'section' => $_section,
             'name' => $name,