| @@ -9,9 +9,9 @@ | ||
| 9 | 9 | public $siteinfo; |
| 10 | 10 | public $bvinfo; |
| 11 | 11 | public $bvapi; |
| 12 | 12 | |
| 13 | - const INFO_WING_VERSION = 1.6; | |
| 13 | + const INFO_WING_VERSION = 1.4; | |
| 14 | 14 | |
| 15 | 15 | public function __construct($callback_handler) { |
| 16 | 16 | $this->db = $callback_handler->db; |
| 17 | 17 | $this->siteinfo = $callback_handler->siteinfo; |
| @@ -333,34 +333,14 @@ | ||
| 333 | 333 | $transient = $this->objectToArray($transient); |
| 334 | 334 | return array("transient" => $transient); |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - function getPluginsHandler($args = array()) { | |
| 338 | - $result = array_merge($this->getPlugins(), $this->getTransient('update_plugins')); | |
| 339 | - | |
| 340 | - if (array_key_exists('clear_filters', $args)) { | |
| 341 | - $filters = $args['clear_filters']; | |
| 342 | - foreach ($filters as $filter) | |
| 343 | - remove_all_filters($filter); | |
| 344 | - $transient_without_filters = $this->getTransient('update_plugins'); | |
| 345 | - $result['transient_without_filters'] = $transient_without_filters['transient']; | |
| 346 | - } | |
| 347 | - | |
| 348 | - return $result; | |
| 337 | + function getPluginsHandler() { | |
| 338 | + return array_merge($this->getPlugins(), $this->getTransient('update_plugins')); | |
| 349 | 339 | } |
| 350 | 340 | |
| 351 | - function getThemesHandler($args = array()) { | |
| 352 | - $result = array_merge($this->getThemes(), $this->getTransient('update_themes')); | |
| 353 | - | |
| 354 | - if (array_key_exists('clear_filters', $args)) { | |
| 355 | - $filters = $args['clear_filters']; | |
| 356 | - foreach ($filters as $filter) | |
| 357 | - remove_all_filters($filter); | |
| 358 | - $transient_without_filters = $this->getTransient('update_themes'); | |
| 359 | - $result['transient_without_filters'] = $transient_without_filters['transient']; | |
| 360 | - } | |
| 361 | - | |
| 362 | - return $result; | |
| 341 | + function getThemesHandler() { | |
| 342 | + return array_merge($this->getThemes(), $this->getTransient('update_themes')); | |
| 363 | 343 | } |
| 364 | 344 | |
| 365 | 345 | function getSiteInfo($args) { |
| 366 | 346 | $result = array(); |
| @@ -377,12 +357,12 @@ | ||
| 377 | 357 | if (array_key_exists('users', $args)) |
| 378 | 358 | $result['users'] = $this->getUsersHandler($args['users']); |
| 379 | 359 | |
| 380 | 360 | if (array_key_exists('plugins', $args)) |
| 381 | - $result['plugins'] = $this->getPluginsHandler($args['plugins']); | |
| 361 | + $result['plugins'] = $this->getPluginsHandler(); | |
| 382 | 362 | |
| 383 | 363 | if (array_key_exists('themes', $args)) |
| 384 | - $result['themes'] = $this->getThemesHandler($args['themes']); | |
| 364 | + $result['themes'] = $this->getThemesHandler(); | |
| 385 | 365 | |
| 386 | 366 | if (array_key_exists('core', $args)) |
| 387 | 367 | $result['core'] = $this->getTransient('update_core'); |
| 388 | 368 | |
| @@ -463,12 +443,8 @@ | ||
| 463 | 443 | $resp = $this->getPosts($params['post_type'], $count); |
| 464 | 444 | break; |
| 465 | 445 | case "gtsts": |
| 466 | 446 | $resp = $this->getStats(); |
| 467 | - break; | |
| 468 | - case "gtdbvariables": | |
| 469 | - $variable = (array_key_exists('variable', $params)) ? $variable : ""; | |
| 470 | - $resp = $this->db->showDbVariables($variable); | |
| 471 | 447 | break; |
| 472 | 448 | case "gtplgs": |
| 473 | 449 | $resp = $this->getPlugins(); |
| 474 | 450 | break; |