Changeset 2134


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
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/comments.php

    r2107 r2134  
    182182
    183183    'F_ACTION'=>PHPWG_ROOT_PATH.'comments.php',
    184     'F_KEYWORD'=>@htmlentities(stripslashes($_GET['keyword'])),
    185     'F_AUTHOR'=>@htmlentities(stripslashes($_GET['author'])),
     184    'F_KEYWORD'=>@htmlspecialchars(stripslashes($_GET['keyword'])),
     185    'F_AUTHOR'=>@htmlspecialchars(stripslashes($_GET['author'])),
    186186
    187187    'U_HOME' => make_index_url(),
  • 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;
  • trunk/tools/ws.htm

    r1912 r2134  
    33<head>
    44<title>PWG web service explorer</title>
     5<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    56<script type="text/javascript" src="prototype.js" ></script>
    67
     
    170171                        var acceptArray = method.params[i].acceptArray;
    171172                        var defaultValue = method.params[i].defaultValue == null ? '' : method.params[i].defaultValue;
    172  
     173
    173174                        row.insertCell(0).innerHTML = method.params[i].name;
    174175                        row.insertCell(1).innerHTML = '<span title="parameter is '+(isOptional ? 'optional':'required') +'">'+(isOptional ? '?':'*')+'</span>'
     
    334335    <table>
    335336    <tr style="vertical-align:top">
    336    
     337
    337338    <td>
    338339      <div id="methodDescription"></div>
     
    347348          </td>
    348349        </tr>
    349  
     350
    350351        <tr>
    351352          <td>Response format:</td>
     
    365366      </p>
    366367    </td>
    367    
     368
    368369
    369370    <td>
     
    381382      </table>
    382383    </td>
    383    
     384
    384385    </tr>
    385386    </table>
    386    
     387
    387388                <div style="display:none;">
    388389                        <!-- hiddenForm for POST -->
Note: See TracChangeset for help on using the changeset viewer.