. * */ OC::$CLASSPATH['OC_Gallery_Album'] = 'apps/gallery/lib/album.php'; OC::$CLASSPATH['OC_Gallery_Photo'] = 'apps/gallery/lib/photo.php'; OC::$CLASSPATH['OC_Gallery_Scanner'] = 'apps/gallery/lib/scanner.php'; OC::$CLASSPATH['OC_Gallery_Sharing'] = 'apps/gallery/lib/sharing.php'; OC::$CLASSPATH['OC_Gallery_Hooks_Handlers'] = 'apps/gallery/lib/hooks_handlers.php'; OC::$CLASSPATH['Pictures_Managers'] = 'apps/gallery/lib/managers.php'; OC::$CLASSPATH['Pictures_Tiles'] = 'apps/gallery/lib/tiles.php'; $l = OC_L10N::get('gallery'); OCP\App::register(array( 'order' => 20, 'id' => 'gallery', 'name' => 'Pictures')); OCP\App::addNavigationEntry( array( 'id' => 'gallery_index', 'order' => 20, 'href' => OCP\Util::linkTo('gallery', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/picture.svg'), 'name' => $l->t('Pictures'))); class OC_GallerySearchProvider extends OC_Search_Provider{ function search($query){ $stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE uid_owner = ? AND album_name LIKE ?'); $result = $stmt->execute(array(OCP\USER::getUser(),'%'.$query.'%')); $results=array(); while($row=$result->fetchRow()){ $results[]=new OC_Search_Result($row['album_name'],'',OCP\Util::linkTo('gallery', 'index.php').'?view='.$row['album_name'],'Galleries'); } return $results; } } //OC_Search::registerProvider('OC_GallerySearchProvider'); require_once('apps/gallery/lib/hooks_handlers.php');