- Timestamp:
- May 23, 2019 6:40:04 PM (5 years ago)
- Location:
- trunk/lib
- Files:
-
- 1 added
- 5 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); -
trunk/lib/FormValidator.inc.php
r665 r685 219 219 switch ($e['type']) { 220 220 case MSG_ERR: 221 echo '<div data-alert class="sc-msg-error alert-box alert">' . $e['message'] . '<a href="#" class="close">×</a></div>';221 echo '<div data-alert data-closable class="sc-msg-error alert-box callout alert">' . $e['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">×</span></a></div>'; 222 222 break; 223 223 224 224 case MSG_WARNING: 225 echo '<div data-alert class="sc-msg-warning alert-box warning">' . $e['message'] . '<a href="#" class="close">×</a></div>';225 echo '<div data-alert data-closable class="sc-msg-warning alert-box callout warning">' . $e['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">×</span></a></div>'; 226 226 break; 227 227 228 228 case MSG_SUCCESS: 229 echo '<div data-alert class="sc-msg-success alert-box alert">' . $e['message'] . '<a href="#" class="close">×</a></div>';229 echo '<div data-alert data-closable class="sc-msg-success alert-box callout success">' . $e['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">×</span></a></div>'; 230 230 break; 231 231 232 232 case MSG_NOTICE: 233 233 default: 234 echo '<div data-alert class="sc-msg-notice alert-box info">' . $e['message'] . '<a href="#" class="close">×</a></div>';234 echo '<div data-alert data-closable class="sc-msg-notice alert-box callout primary info">' . $e['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">×</span></a></div>'; 235 235 break; 236 236 } -
trunk/lib/HTML.inc.php
r666 r685 64 64 if (!isset($buttons[0]) || !is_array($buttons[0])) { 65 65 $app =& App::getInstance(); 66 $app->logMsg(sprintf('Incorrect parameters passed to HTML::buttons(): %s', getDump($buttons)), LOG_DEBUG, __FILE__, __LINE__);66 $app->logMsg(sprintf('Incorrect parameters passed to %s: %s', __METHHOD__, getDump($options)), LOG_NOTICE, __FILE__, __LINE__); 67 67 return false; 68 68 } … … 237 237 if (!isset($options) || !is_array($options)) { 238 238 $app =& App::getInstance(); 239 $app->logMsg(sprintf('Incorrect parameters passed to HTML::printSelectOptions(): %s', getDump($options)), LOG_DEBUG, __FILE__, __LINE__);239 $app->logMsg(sprintf('Incorrect parameters passed to %s: %s', __METHHOD__, getDump($options)), LOG_NOTICE, __FILE__, __LINE__); 240 240 return false; 241 241 } -
trunk/lib/Lock.inc.php
r601 r685 272 272 273 273 $this->initDB(); 274 275 if ($this->_auth->get('user_id') == '' || filter_var($this->_auth->get('user_id'), FILTER_VALIDATE_INT) === false) { 276 $app->logMsg(sprintf("auth->get('user_id') returns a non-integer: %s", $this->_auth->get('user_id')), LOG_ERR, __FILE__, __LINE__); 277 return false; 278 } 274 279 275 280 // Expire old locks. -
trunk/lib/SortOrder.inc.php
r681 r685 213 213 if ($this->sort_by == $col) { 214 214 if (mb_strtolower($this->order) == 'desc') { 215 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=ASC'); ?>" title="<?php echo _("Change to ascending sort order"); ?>" class="sc-sort sc-desc"><?php echo $this->desc_widget; ?></a><?php echo $col_name; ?><?php215 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=ASC'); ?>" data-tooltip title="<?php echo _("Change to ascending sort order"); ?>" class="sc-sort sc-desc"><?php echo $this->desc_widget; ?></a><?php echo $col_name; ?><?php 216 216 } else { 217 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=DESC'); ?>" title="<?php echo _("Change to descending sort order"); ?>" class="sc-sort sc-asc"><?php echo $this->asc_widget; ?></a><?php echo $col_name; ?><?php217 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=DESC'); ?>" data-tooltip title="<?php echo _("Change to descending sort order"); ?>" class="sc-sort sc-asc"><?php echo $this->asc_widget; ?></a><?php echo $col_name; ?><?php 218 218 } 219 219 } else { 220 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=' . $default_order); ?>" title="<?php echo sprintf(_("Sort by %s"), $col_name); ?>" class="sc-sort"><?php echo $col_name; ?></a><?php220 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=' . $default_order); ?>" data-tooltip title="<?php echo sprintf(_("Sort by %s"), $col_name); ?>" class="sc-sort"><?php echo $col_name; ?></a><?php 221 221 } 222 222 } else {
Note: See TracChangeset
for help on using the changeset viewer.