Changeset 2298
- Timestamp:
- 12/13/10 22:51:54 (17 months ago)
- Location:
- branches/1.5
- Files:
-
- 5 modified
-
Hotaru.php (modified) (3 diffs)
-
libs/Debug.php (modified) (2 diffs)
-
libs/PageHandling.php (modified) (2 diffs)
-
libs/Paginator.php (modified) (1 diff)
-
libs/ThemeSettings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/Hotaru.php
r2295 r2298 379 379 } 380 380 381 382 /**383 * Converts a friendly url into a standard one384 *385 * @param string $friendly_url386 * return string $standard_url387 */388 public function friendlyToStandardUrl($friendly_url)389 {390 return $this->pageHandling->friendlyToStandardUrl($this, $friendly_url);391 }392 393 394 381 /** 395 382 * Generate either default or friendly urls … … 1089 1076 { 1090 1077 $themeSettings = new ThemeSettings(); 1091 return $themeSettings->readThemeMeta($th is, $theme);1078 return $themeSettings->readThemeMeta($theme); 1092 1079 } 1093 1080 … … 2169 2156 2170 2157 2171 /* *************************************************************2172 *2173 * EMAIL FUNCTIONS2174 *2175 * *********************************************************** */2176 2177 /**2178 * Send emails2179 *2180 * @param string $to - defaults to SITE_EMAIL2181 * @param string $subject - defaults to "No Subject";2182 * @param string $body - returns false if empty2183 * @param string $headers default is "From: " . SITE_EMAIL . "\r\nReply-To: " . SITE_EMAIL . "\r\nX-Priority: 3\r\n";2184 * @param string $type - default is "email", but you can write to a "log" file, print to "screen" or "return" an array of the content2185 * @return array|false - only if $type = "return"2186 */2187 public function email($to = '', $subject = '', $body = '', $headers = array(), $type = 'email', $from='')2188 {2189 return EmailFunctions::email($to, $subject, $body, $from, $headers);2190 }2191 2192 2193 2158 /* ************************************************************* 2194 2159 * -
branches/1.5/libs/Debug.php
r2292 r2298 114 114 $subject = "System Report from ".SITE_NAME; 115 115 $body = $sysinfo->logSystemReport($h, $report); 116 $h->email($to, $subject, $body); 117 $h->message = $h->lang['admin_maintenance_system_report_emailed']; 118 $h->messageType = 'green'; 116 EmailFunctions::email($to, $subject, $body); 117 $h->messages[$h->lang['admin_maintenance_system_report_emailed']] = 'green'; 119 118 return true; 120 119 } … … 122 121 123 122 if (self::log('system_report', $sysinfo->logSystemReport($h, $report), FALSE)) { 124 $h->message = $h->lang['admin_maintenance_system_report_success']; 125 $h->messageType = 'green'; 123 $h->messages[$h->lang['admin_maintenance_system_report_success']] = 'green'; 126 124 return TRUE; 127 125 } 128 126 129 $h->message = $h->lang['admin_maintenance_system_report_failure']; 130 $h->messageType = 'red'; 127 $h->messages[$h->lang['admin_maintenance_system_report_failure']] = 'red'; 131 128 return FALSE; 132 129 } -
branches/1.5/libs/PageHandling.php
r2292 r2298 391 391 392 392 /** 393 * Return page numbers bar394 *395 * @param object $pageObject - current object of type Paginated396 * @return string - HTML for page number bar397 */398 public function pageBar($h, $pageObject = NULL)399 {400 require_once(EXTENSIONS . 'Paginated/Paginated.php');401 require_once(EXTENSIONS . 'Paginated/DoubleBarLayout.php');402 403 $pageObject->setLayout(new DoubleBarLayout());404 return $pageObject->fetchPagedNavigation($h);405 }406 407 408 /**409 393 * Converts a friendly url into a standard one 410 394 * … … 413 397 * return string $standard_url 414 398 */ 415 public function friendlyToStandardUrl( Hotaru $h, $friendly_url = '')399 public function friendlyToStandardUrl($friendly_url = '', $is_admin = FALSE) 416 400 { 417 401 $path = $friendly_url; 418 402 419 $head = (($ h->isAdmin)?'admin_':'').'index.php?';403 $head = (($is_admin)?'admin_':'').'index.php?'; 420 404 421 405 /* Many pages use standard urls even if friendly urls is enabled. For example, -
branches/1.5/libs/Paginator.php
r2162 r2298 103 103 // if it doesn't contain $head, then it must be a friendly url 104 104 if ($path != SITEURL && !strrpos($path, $head)) { 105 $path = $h-> friendlyToStandardUrl($path);105 $path = $h->pageHandling->friendlyToStandardUrl($path, (bool) $h->isAdmin); 106 106 } 107 107 -
branches/1.5/libs/ThemeSettings.php
r2292 r2298 34 34 * @return array|false 35 35 */ 36 public function readThemeMeta($ h, $theme = 'default')36 public function readThemeMeta($theme = 'default') 37 37 { 38 38 if (!$theme) {