Ignore:
Timestamp:
Oct 11, 2007, 2:10:41 AM (17 years ago)
Author:
rvelices
Message:
  • changed htmlentities to htmlspecialchars in comments.php (utf-8 issue)
  • web service explorer in utf-8
  • removed warning in function load_language
  • feature: show_queries also shows number of selected rows or number of affected rows
File:
1 edited

Legend:

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

    r2132 r2134  
    517517      }
    518518      else
    519       { // probably english that is the same in all ISO-xxx and UTF-8
     519      { // UTF-8
     520        $language_name = convert_charset($language_name,
     521              'utf-8', $target_charset);
    520522        $languages[$file] = $language_name;
    521523      }
     
    700702    $output.= "\n".'(total time      : ';
    701703    $output.= number_format( ($time+$start-$t2), 3, '.', ' ').' s)';
     704    if ( $result!=null and preg_match('/\s*SELECT\s+/i',$query) )
     705    {
     706      $output.= "\n".'(num rows        : ';
     707      $output.= mysql_num_rows($result).' )';
     708    }
     709    elseif ( $result!=null
     710      and preg_match('/\s*INSERT|UPDATE|REPLACE|DELETE\s+/i',$query) )
     711    {
     712      $output.= "\n".'(affected rows   : ';
     713      $output.= mysql_affected_rows().' )';
     714    }
    702715    $output.= "</pre>\n";
    703716
     
    15301543    }
    15311544
    1532     // universal language (like Eng) no conversion required
     1545    // UTF-8 ?
    15331546    $f = $dir.'/'.$filename;
    15341547    if (file_exists($f))
    15351548    {
     1549      $source_charset = 'utf-8';
    15361550      $source_file = $f;
    15371551      break;
     
    15441558      {
    15451559        $source_charset = 'iso-8859-1';
    1546         $source_file = $f;
    1547         break;
    1548       }
    1549     }
    1550 
    1551     if ($target_charset=='iso-8859-1' and
    1552       in_array( substr($language,2), array('en','fr','de','es','it','nl') )
    1553       )
    1554     { // we accept conversion from UTF-8 to ISO-8859-1 for backward compatibility ONLY
    1555       $f = $dir.'.utf-8/'.$filename;
    1556       if (file_exists($f))
    1557       {
    1558         $source_charset = 'utf-8';
    15591560        $source_file = $f;
    15601561        break;
     
    16001601      else
    16011602      {
    1602         $lang = array_merge( $lang, $load_lang );
    1603         $lang_info = array_merge( $lang_info, $load_lang_info );
     1603        $lang = array_merge( $lang, (array)$load_lang );
     1604        $lang_info = array_merge( $lang_info, (array)$load_lang_info );
    16041605      }
    16051606      return true;
Note: See TracChangeset for help on using the changeset viewer.