Changeset 685 for trunk/lib/App.inc.php
- Timestamp:
- May 23, 2019 6:40:04 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r683 r685 764 764 switch ($m['type']) { 765 765 case MSG_ERR: 766 echo '<div data-alert class="sc-msg-error alert-box alert">' . $m['message'] . '<a href="#" class="close">×</a></div>';766 echo '<div data-alert data-closable class="sc-msg-error alert-box callout alert">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">×</span></a></div>'; 767 767 break; 768 768 769 769 case MSG_WARNING: 770 echo '<div data-alert class="sc-msg-warning alert-box warning">' . $m['message'] . '<a href="#" class="close">×</a></div>';770 echo '<div data-alert data-closable class="sc-msg-warning alert-box callout warning">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">×</span></a></div>'; 771 771 break; 772 772 773 773 case MSG_SUCCESS: 774 echo '<div data-alert class="sc-msg-success alert-box success">' . $m['message'] . '<a href="#" class="close">×</a></div>';774 echo '<div data-alert data-closable class="sc-msg-success alert-box callout success">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">×</span></a></div>'; 775 775 break; 776 776 777 777 case MSG_NOTICE: 778 778 default: 779 echo '<div data-alert class="sc-msg-notice alert-box info">' . $m['message'] . '<a href="#" class="close">×</a></div>';779 echo '<div data-alert data-closable class="sc-msg-notice alert-box callout primary info">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">×</span></a></div>'; 780 780 break; 781 781 } … … 1079 1079 * @return string url with attached queries and, if not using cookies, the session id 1080 1080 */ 1081 public function url($url , $carry_args=null, $always_include_sid=false, $include_csrf_token=false)1081 public function url($url='', $carry_args=null, $always_include_sid=false, $include_csrf_token=false) 1082 1082 { 1083 1083 if (!$this->running) { … … 1118 1118 } 1119 1119 1120 // If the URL is empty, use REQUEST_URI without the QUERY_STRING. 1121 if ('' == $url) { 1122 $url = str_replace([getenv('QUERY_STRING'), '?'], '', getenv('REQUEST_URI')); 1123 } 1124 1120 1125 // Get the first delimiter that is needed in the url. 1121 1126 $delim = mb_strpos($url, '?') !== false ? ini_get('arg_separator.output') : '?'; … … 1141 1146 $url = $parts[0]; 1142 1147 $anchor = isset($parts[1]) ? $parts[1] : ''; 1143 1144 1148 // $anchor = 1145 1149 … … 1177 1181 } 1178 1182 1183 if ('' == $url) { 1184 $this->logMsg(sprintf('Generated empty URL. Args: %s', getDump(func_get_args())), LOG_NOTICE, __FILE__, __LINE__); 1185 } 1186 1179 1187 return $url; 1180 1188 } … … 1189 1197 * @since 09 Dec 2005 17:58:45 1190 1198 */ 1191 public function oHREF($url , $carry_args=null, $always_include_sid=false, $include_csrf_token=false)1199 public function oHREF($url='', $carry_args=null, $always_include_sid=false, $include_csrf_token=false) 1192 1200 { 1193 1201 // Process the URL. … … 1406 1414 } 1407 1415 1408 if (preg_match('!^/!', $url)) { 1409 // If relative URL is given, prepend site_url, which contains: scheme://hostname[:port] 1410 $url = sprintf('%s%s', $this->getParam('site_url'), $url); 1411 } 1416 // FIXME: actually, it seems better to continue using a relative URL since we can't guess the port at the reverse proxy (e.g., port 3000 for browser-sync). 1417 // if (preg_match('!^/!', $url)) { 1418 // // If relative URL is given, prepend site_url, which contains: scheme://hostname[:port] 1419 // $url = sprintf('%s%s', $this->getParam('site_url'), $url);k 1420 // } 1412 1421 1413 1422 $url = $this->url($url, $carry_args, $always_include_sid);
Note: See TracChangeset
for help on using the changeset viewer.