| @@ -259,9 +259,21 @@ | ||
| 259 | 259 | $result = JLoader::import('adapter.application.version'); |
| 260 | 260 | break; |
| 261 | 261 | |
| 262 | 262 | default: |
| 263 | - $result = false; | |
| 263 | + /** | |
| 264 | + * Autoload the native form fields. | |
| 265 | + * | |
| 266 | + * @since 10.1.51 | |
| 267 | + */ | |
| 268 | + if (preg_match("/^JFormField([a-z0-9]+)$/i", $class, $match)) | |
| 269 | + { | |
| 270 | + $result = JLoader::import('adapter.form.fields.' . strtolower($match[1])); | |
| 271 | + } | |
| 272 | + else | |
| 273 | + { | |
| 274 | + $result = false; | |
| 275 | + } | |
| 264 | 276 | } |
| 265 | 277 | |
| 266 | 278 | // in case the loaded class exists and the requested on starts with VikWP, |
| 267 | 279 | // create an alias to support a more appropriate notation |