summaryrefslogtreecommitdiffstats
path: root/apps/gallery/appinfo
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-08-25 01:52:27 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-08-25 01:52:27 +0200
commitfa3497f6ed54b6de16dc44ae94721f00b5d5fc6b (patch)
tree7b3a6c1b946273ee0f1f3f6ade1f9cd3483004dc /apps/gallery/appinfo
parentfd5af9aff4245127f32f3b90dbd6e52792984447 (diff)
downloadnextcloud-server-fa3497f6ed54b6de16dc44ae94721f00b5d5fc6b.tar.gz
nextcloud-server-fa3497f6ed54b6de16dc44ae94721f00b5d5fc6b.zip
add backticks to SQL, use limit parameter instead of LIMIT SQL
Diffstat (limited to 'apps/gallery/appinfo')
-rw-r--r--apps/gallery/appinfo/app.php2
-rw-r--r--apps/gallery/appinfo/update.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/gallery/appinfo/app.php b/apps/gallery/appinfo/app.php
index 9103f66441d..f26f23466be 100644
--- a/apps/gallery/appinfo/app.php
+++ b/apps/gallery/appinfo/app.php
@@ -43,7 +43,7 @@ OCP\App::addNavigationEntry( array(
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 ?');
+ $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()){
diff --git a/apps/gallery/appinfo/update.php b/apps/gallery/appinfo/update.php
index c1d22127428..65e7734c47f 100644
--- a/apps/gallery/appinfo/update.php
+++ b/apps/gallery/appinfo/update.php
@@ -2,9 +2,9 @@
$currentVersion=OC_Appconfig::getValue('gallery', 'installed_version');
if (version_compare($currentVersion, '0.5.0', '<')) {
- $stmt = OCP\DB::prepare('DROP TABLE IF EXISTS *PREFIX*gallery_photos');
+ $stmt = OCP\DB::prepare('DROP TABLE IF EXISTS `*PREFIX*gallery_photos`');
$stmt->execute();
- $stmt = OCP\DB::prepare('DROP TABLE IF EXISTS *PREFIX*gallery_albums');
+ $stmt = OCP\DB::prepare('DROP TABLE IF EXISTS `*PREFIX*gallery_albums`');
$stmt->execute();
\OC_DB::createDbFromStructure(OC_App::getAppPath($appid).'/appinfo/database.xml');