Ignore:
Timestamp:
Aug 28, 2008, 2:32:39 AM (16 years ago)
Author:
rvelices
Message:
  • based on test_menu by grum (thanks to you) - integration of dynamic menu bar to pwg
  • the menubar is composed now of dynamic blocks that can be ordered/hidden
  • plugins can add their own blocks
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r2478 r2488  
    18461846function create_table_add_character_set($query)
    18471847{
    1848   defined('DB_CHARSET') or die('create_table_add_character_set DB_CHARSET undefined');
     1848  defined('DB_CHARSET') or trigger_error('create_table_add_character_set DB_CHARSET undefined', E_USER_ERROR);
    18491849  if ('DB_CHARSET'!='')
    18501850  {
     
    18541854    }
    18551855    $charset_collate = " DEFAULT CHARACTER SET ".DB_CHARSET;
    1856     if ('DB_COLLATE'!='')
     1856    if (DB_COLLATE!='')
    18571857    {
    18581858      $charset_collate .= " COLLATE ".DB_COLLATE;
    18591859    }
    1860     $query=trim($query);
    1861     $query=trim($query, ';');
    1862     if (preg_match('/^CREATE\s+TABLE/i',$query))
    1863     {
    1864       $query.=$charset_collate;
    1865     }
    1866     $query .= ';';
     1860    if ( is_array($query) )
     1861    {
     1862      foreach( $query as $id=>$q)
     1863      {
     1864        $q=trim($q);
     1865        $q=trim($q, ';');
     1866        if (preg_match('/^CREATE\s+TABLE/i',$q))
     1867        {
     1868          $q.=$charset_collate;
     1869        }
     1870        $q .= ';';
     1871        $query[$id] = $q;
     1872      }
     1873    }
     1874    else
     1875    {
     1876      $query=trim($query);
     1877      $query=trim($query, ';');
     1878      if (preg_match('/^CREATE\s+TABLE/i',$query))
     1879      {
     1880        $query.=$charset_collate;
     1881      }
     1882      $query .= ';';
     1883    }
    18671884  }
    18681885  return $query;
Note: See TracChangeset for help on using the changeset viewer.