Change search to use routing

remotes/origin/stable5
Bart Visscher 13 years ago
parent 1bdd0c949b
commit ed7accd237
  1. 2
      core/js/js.js
  2. 3
      core/routes.php
  3. 8
      search/ajax/search.php

@ -113,7 +113,7 @@ var OC={
}
link+=file;
}else{
if ((app == 'settings' || app == 'core') && type == 'ajax') {
if ((app == 'settings' || app == 'core' || app == 'search') && type == 'ajax') {
link+='/index.php/';
}
else {

@ -9,6 +9,9 @@
require_once 'settings/routes.php';
// Core ajax actions
// Search
$this->create('search_ajax_search', '/search/ajax/search.php')
->actionInclude('search/ajax/search.php');
// AppConfig
$this->create('core_ajax_appconfig', '/core/ajax/appconfig.php')
->actionInclude('core/ajax/appconfig.php');

@ -21,17 +21,15 @@
*
*/
// Init owncloud
require_once '../../lib/base.php';
// Check if we are a user
OC_JSON::checkLoggedIn();
OC_App::loadApps();
$query=(isset($_GET['query']))?$_GET['query']:'';
if($query) {
$result=OC_Search::search($query);
OC_JSON::encodedPrint($result);
}else{
}
else {
echo 'false';
}

Loading…
Cancel
Save