Changeset 1214
- Timestamp:
- 02/22/10 15:30:59 (3 years ago)
- Location:
- branches/1.2
- Files:
-
- 1 added
- 3 edited
-
Hotaru.php (modified) (4 diffs)
-
libs/Debug.php (modified) (3 diffs)
-
libs/EmailFunctions.php (added)
-
libs/extensions/ezSQL/mysql/ez_sql_mysql.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/Hotaru.php
r1213 r1214 1192 1192 public function openLog($type = 'debug', $mode = 'a+') 1193 1193 { 1194 $this->debug->openLog($t his, $type, $mode);1194 $this->debug->openLog($type, $mode); 1195 1195 } 1196 1196 … … 1203 1203 public function writeLog($type = 'error', $string = '') 1204 1204 { 1205 $this->debug->writeLog($t his, $type, $string);1205 $this->debug->writeLog($type, $string); 1206 1206 } 1207 1207 … … 1214 1214 public function closeLog($type = 'error') 1215 1215 { 1216 $this->debug->closeLog($t his, $type);1216 $this->debug->closeLog($type); 1217 1217 } 1218 1218 … … 2029 2029 return $widget->getPluginFromFunction($this, $function); 2030 2030 } 2031 2032 2033 /* ************************************************************* 2034 * 2035 * EMAIL FUNCTIONS 2036 * 2037 * *********************************************************** */ 2038 2039 /** 2040 * Send emails 2041 * 2042 * @param string $to - defaults to SITE_EMAIL 2043 * @param string $subject - defaults to "No Subject"; 2044 * @param string $body - returns false if empty 2045 * @param string $headers default is "From: " . SITE_EMAIL . "\r\nReply-To: " . SITE_EMAIL . "\r\nX-Priority: 3\r\n"; 2046 * @param string $type - default is "email", but you can write to a "log" file, print to "screen" or "return" an array of the content 2047 * @return array|false - only if $type = "return" 2048 */ 2049 public function email($to = '', $subject = '', $body = '', $headers = '', $type = 'email') 2050 { 2051 require_once(LIBS . 'EmailFunctions.php'); 2052 $emailFunctions = new EmailFunctions($to, $subject, $body, $headers, $type); 2053 $emailFunctions->type = $type; 2054 return $emailFunctions->doEmail(); 2055 } 2031 2056 } 2032 2057 ?> -
branches/1.2/libs/Debug.php
r961 r1214 57 57 * @link http://php.net/manual/en/function.fopen.php 58 58 */ 59 public function openLog($ h, $type = 'debug', $mode = 'a+')59 public function openLog($type = 'debug', $mode = 'a+') 60 60 { 61 61 $this->log[$type] = CACHE . "debug_logs/" . $type . ".txt"; … … 78 78 * @param string $type "error", "speed", etc. 79 79 */ 80 public function writeLog($ h, $type = 'debug', $string = '')80 public function writeLog($type = 'debug', $string = '') 81 81 { 82 82 if ($string) { … … 92 92 * @param string $type "speed", "error", etc. 93 93 */ 94 public function closeLog($ h, $type = 'debug')94 public function closeLog($type = 'debug') 95 95 { 96 96 if (isset($this->fh[$type])) { fclose($this->fh[$type]); } -
branches/1.2/libs/extensions/ezSQL/mysql/ez_sql_mysql.php
r1213 r1214 245 245 246 246 $body .= "If you need help, visit the forums at http://hotarucms.org\r\n"; 247 mail(SITE_EMAIL, $subject, $body, $headers); 247 248 // we can avoid using the $h object (which we might not have) by calling EmailFunctions directly. 249 require_once(LIBS . 'EmailFunctions.php'); 250 $emailFunctions = new EmailFunctions(SITE_EMAIL, $subject, $body, $headers); 251 $emailFunctions->doEmail(); 248 252 } 249 253
Note: See TracChangeset
for help on using the changeset viewer.