public static function execute($search) { $modules = Services::getUninstalled(); $result = array('entries' => array()); foreach ($modules['entries'] as $module) { if (stripos($module['code'], $search) !== false || stripos($module['title'], $search) !== false) { $result['entries'][] = $module; } } $result['total'] = count($result['entries']); return $result; }
public static function execute() { if (!isset($_GET['search'])) { $_GET['search'] = ''; } if (!empty($_GET['search'])) { $result = Services::findUninstalled($_GET['search']); } else { $result = Services::getUninstalled(); } $result['rpcStatus'] = RPC::STATUS_SUCCESS; echo json_encode($result); }