- Timestamp:
- 12/13/09 14:19:40 (2 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
-
common/common.php (modified) (1 diff)
-
common/db/textblock.php (modified) (2 diffs)
-
scripts/change-special-chars (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/common.php
r1069 r1074 1 1 <?php 2 3 // Changes all special characters ș, ț, Ș, Ț to ş, ţ, Ş, Ţ 4 // commabelow to cedille and returns the modified text 5 // FIXME: reverse characters in to_change when windows XP dies 6 function text_change_special_chars($text) { 7 $to_change = array("ș"=>"ş", "ț"=>"ţ", "Ș"=>"Ş", "Ț"=>"Ţ"); 8 9 foreach ($to_change as $bad=>$good) { 10 $text = mb_ereg_replace($bad, $good, $text); 11 } 12 13 return $text; 14 } 2 15 3 16 // Nicer way to get an element from an array. It returns a default value -
trunk/common/db/textblock.php
r1057 r1074 6 6 require_once(IA_ROOT_DIR."common/security.php"); 7 7 require_once(IA_ROOT_DIR."common/textblock.php"); 8 require_once(IA_ROOT_DIR."common/common.php"); 8 9 9 10 // Textblock-related db functions. … … 18 19 $remote_ip_info = null) { 19 20 $name = normalize_page_name($name); 21 22 // Change special characters in content 23 $content = text_change_special_chars($content); 24 20 25 $tb = array( 21 26 'name' => $name,
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)