Changeset 2856139
- Timestamp:
- 01/27/2023 11:11:39 PM (3 years ago)
- Location:
- notify-events/trunk
- Files:
-
- 5 edited
-
models/Core.php (modified) (2 diffs)
-
models/Event.php (modified) (1 diff)
-
models/Model.php (modified) (1 diff)
-
notify-events.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
notify-events/trunk/models/Core.php
r2482606 r2856139 105 105 } 106 106 107 protected static function get_route_param($name, $default) 108 { 109 if (!array_key_exists($name, $_GET)) { 110 return $default; 111 } 112 113 if (!is_string($_GET[$name])) { 114 return $default; 115 } 116 117 return sanitize_key($_GET[$name]); 118 } 119 107 120 /** 108 121 * … … 110 123 public function route() 111 124 { 112 $module_name = sanitize_key($_GET['module']); 113 $controller_name = sanitize_key($_GET['controller']); 114 $action_name = sanitize_key($_GET['action']); 115 116 if (empty($module_name)) { 117 $module_name = 'notify_events'; 118 } 119 120 if (empty($controller_name)) { 121 $controller_name = 'about'; 122 } 123 124 if (empty($action_name)) { 125 $action_name = 'index'; 126 } 125 $module_name = static::get_route_param('module', 'notify_events'); 126 $controller_name = static::get_route_param('controller', 'about'); 127 $action_name = static::get_route_param('action', 'index'); 127 128 128 129 $controller_name = Inflector::class_from_id($controller_name); -
notify-events/trunk/models/Event.php
r2482606 r2856139 295 295 if (preg_match_all('#\[([a-z0-9-]*)\]#i', $value, $matches) !== false) { 296 296 $tags = static::tag_labels(); 297 $tags = call_user_func_array('array_merge', $tags);297 $tags = call_user_func_array('array_merge', array_values($tags)); 298 298 $tags = array_keys($tags); 299 299 -
notify-events/trunk/models/Model.php
r2432603 r2856139 193 193 protected function rule_required($attribute, $value, $params) 194 194 { 195 if ( ($value === null) || (trim((string)$value) === '')) {195 if (empty($value) || (is_string($value) && trim($value) === '')) { 196 196 $message = array_key_exists('message', $params) ? $params['message'] : __('Field required', WPNE); 197 197 -
notify-events/trunk/notify-events.php
r2770094 r2856139 6 6 Author: Notify.Events 7 7 Author URI: https://notify.events/ 8 Version: 1.3. 18 Version: 1.3.2 9 9 License: GPL-2.0 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
notify-events/trunk/readme.txt
r2770094 r2856139 4 4 Requires at least: 5.3 5 5 Requires PHP: 5.6 6 Tested up to: 6. 07 Stable tag: 1.3. 16 Tested up to: 6.1.1 7 Stable tag: 1.3.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.