]> git.nbdom.net Git - nb.git/commitdiff
etc/dbq/ldap.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 2 Mar 2018 01:33:10 +0000 (01:33 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 2 Mar 2018 01:33:10 +0000 (01:33 +0000)
etc/dbq/ldap.php
lib/php/db.php
lib/php/db/table.php
lib/php/page.php
www/dbq/dbq.php

index 32f5fdeec9b98177d1119b71f2c1a85cf9657fd2..5cee7fd8b864b20cbf5c26aadb394ff6bd826352 100644 (file)
@@ -50,6 +50,7 @@ if (preg_match('/^([^,]+),(.*?)$/',$user,$m)) {
 $filter = '(&('.$filter.')(userPassword=*))';
 $DBQ['ldap'] = $GLOBALS['DBQ_LDAP'] + [
        'name' => $base,
+       'title' => 'nbdom.net',
        'type' => 'ldap',
        'tables' => [
                'me' => [
index ea917918391ba344abc07fe4a7560bb8bbe1471e..4d2cb45cc6b38f798fd8e184b2cdd618483ae673 100644 (file)
@@ -542,7 +542,7 @@ class Db extends nb {
 
                if ($value!==null) return header("$format: $value");
 
-               if (!$mime=mime::get($format)) return false;
+               if (!$mime=Mime::get($format)) return false;
                header('Content-type: '.$mime);
 
                return $mime;
@@ -1329,7 +1329,7 @@ class Db extends nb {
 
        public static function content_type2format($content_type=null) {
                if (empty($content_type)) $content_type = self::client_content_type();
-               switch (mime::ext($content_type)) {
+               switch (Mime::ext($content_type)) {
                        case "html":
                                return 'table';
                        default:
index 71f81c50e6dc1ab88ef078a522539ce2a6070636..2e8df04ce2fa29ec80b9f96c218c16d044ea3ead 100644 (file)
@@ -1610,9 +1610,8 @@ Class Table extends nb {
                if ($this->buttons() and !empty($buttons[0])) $html .= '<td class="action">'.$buttons[0].'</td>'.NB_EOL;
 
                foreach ($row as $k => $v) {
-                       $mime = '';
                        if ( !empty($this->field($k)) ) {
-                               $v = $this->field($k)->htmlValue($v,$mime);
+                               $v = $this->field($k)->htmlValue($v);
                        }
                        $html .= '<td'.$this->_rows_table_class($this->field($k)).'>'.$v.'</td>'.NB_EOL;
                }
index 3361b7a37a5337079542f006970600dc16493ec5..c6bc237dfb128a5ca05587ced7dd3c241b0dc634 100644 (file)
@@ -95,7 +95,7 @@ class Page extends nb {
   public static function out($v) { echo $v; }
 
   public static function title2filename($title,$content_type='') {
-    $ext = $content_type ? mime::ext($content_type) : '';
+    $ext = $content_type ? Mime::ext($content_type) : '';
     $title = self::no_accent($title);
     $title = preg_replace('/\W+/','_',$title);
     if ($ext) $title .= '.'.$ext;
@@ -604,14 +604,14 @@ class Page extends nb {
     $content_type = self::p('content_type');
 
     if (!$format and $content_type) {
-      self::p('format',mime::ext($content_type));
+      self::p('format',Mime::ext($content_type));
 
     } elseif (!$format and ($client_type = self::client_content_type())) {
-      self::p('format',mime::ext($client_type));
+      self::p('format',Mime::ext($client_type));
 
     }
 
-    if (!$content_type and $format) $content_type = mime::get($format);
+    if (!$content_type and $format) $content_type = Mime::get($format);
     if (!$content_type and !$format and self::php_cli()) $content_type = 'text/plain';
     if (!$content_type) $content_type = self::content_type();
     #debug([$content_type,self::content_type()]);
index dfd568c8da1e2372286adec40c552bee17af9f50..a63c2f8623e699b2659bf75fdec8ddb87608453d 100644 (file)
@@ -478,8 +478,6 @@ class DbQ extends nb {
                        $row_parse_post = $this->db()->row_parse_post;
                        return;
                }
-               # nb 31.01.18: move to out.php or ldap.php 
-               if ($this->is_html) Mime::html($r);
 
                if (empty($row_parse_post)) return;
                $row_parse_post($r,$this->table);