Changeset 9
- Timestamp:
- Sep 11, 2005 9:58:14 PM (19 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r8 r9 160 160 $this->_connected = true; 161 161 162 // Set the character set used for communicating with MySQL. 163 $this->query("SET NAMES '" . $this->mysql_character_sets[strtolower(App::getParam('character_set'))] . "'"); 162 // Tell MySQL what character set we're useing. 163 if (preg_match('/^4\.[1-9].*$|^5.*$/', mysql_get_server_info())) { 164 $this->query("SET NAMES '" . $this->mysql_character_sets[strtolower(App::getParam('character_set'))] . "'"); 165 } 164 166 165 167 return true; -
trunk/lib/Utilities.inc.php
r8 r9 187 187 } 188 188 return $output; 189 } 190 191 /** 192 * Encodes an email into a user (at) domain (dot) com format. 193 * 194 * @access public 195 * @param string $email An email to encode. 196 * @param string $at Replaces the @. 197 * @param string $dot Replaces the .. 198 * @return string Encoded email. 199 */ 200 function encodeEmail($email, $at='-at-', $dot='-dot-') 201 { 202 $search = array('/@/', '/\./'); 203 $replace = array($at, $dot); 204 return preg_replace($search, $replace, $email); 189 205 } 190 206
Note: See TracChangeset
for help on using the changeset viewer.