From 8e532b5ceba379f16210b70e4e193fac160a8b39 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 5 Oct 2011 14:32:25 +0200 Subject: [PATCH 1/7] removed extra calendar settings. Also, table layout? --- apps/calendar/templates/settings.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 3bfda702e9..19a1a543b4 100644 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.php @@ -36,29 +36,6 @@ OC_UTIL::addStyle('', 'jquery.multiselect'); - - - - - - - - - t("Minutes");?> t('Calendar CalDAV syncing address:');?> From 28dcbe3cb0ac1618f06df2f53911035c19a3b1fe Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 5 Oct 2011 14:54:34 +0200 Subject: [PATCH 2/7] disabled gallery app by default until it's in a branch --- apps/gallery/appinfo/info.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/gallery/appinfo/info.xml b/apps/gallery/appinfo/info.xml index 154b5fcf7a..054ddb6f13 100644 --- a/apps/gallery/appinfo/info.xml +++ b/apps/gallery/appinfo/info.xml @@ -7,5 +7,4 @@ Bartosz Przybylski 2 - - + \ No newline at end of file From d5931b8c48e83944ca545640d051d9c28e52bfb3 Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Wed, 5 Oct 2011 19:32:30 +0200 Subject: [PATCH 3/7] gallery db query fix --- apps/gallery/ajax/cover.php | 2 +- apps/gallery/ajax/getAlbums.php | 4 ++-- apps/gallery/ajax/getCovers.php | 2 +- apps/gallery/lib_scanner.php | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/gallery/ajax/cover.php b/apps/gallery/ajax/cover.php index 375905ec52..44d7302851 100644 --- a/apps/gallery/ajax/cover.php +++ b/apps/gallery/ajax/cover.php @@ -45,7 +45,7 @@ $box_size = 200; $album_name = $_GET['album']; $x = $_GET['x']; -$stmt = OC_DB::prepare('SELECT file_path FROM *PREFIX*gallery_photos,*PREFIX*gallery_albums WHERE *PREFIX*gallery_albums.uid_owner = ? AND album_name = ? AND *PREFIX*gallery_photos.album_id == *PREFIX*gallery_albums.album_id'); +$stmt = OC_DB::prepare('SELECT `file_path` FROM *PREFIX*gallery_photos,*PREFIX*gallery_albums WHERE *PREFIX*gallery_albums.`uid_owner` = ? AND `album_name` = ? AND *PREFIX*gallery_photos.`album_id` == *PREFIX*gallery_albums.`album_id`'); $result = $stmt->execute(array(OC_User::getUser(), $album_name)); $x = min((int)($x/($box_size/$result->numRows())), $result->numRows()-1); // get image to display $result->seek($x); // never throws diff --git a/apps/gallery/ajax/getAlbums.php b/apps/gallery/ajax/getAlbums.php index 6b551ac49d..2829dae81f 100644 --- a/apps/gallery/ajax/getAlbums.php +++ b/apps/gallery/ajax/getAlbums.php @@ -7,12 +7,12 @@ if (!OC_User::IsLoggedIn()) { } $a = array(); -$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE uid_owner = ?'); +$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ?'); $result = $stmt->execute(array(OC_User::getUser())); while ($r = $result->fetchRow()) { $album_name = $r['album_name']; - $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE album_id = ?'); + $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE `album_id` = ?'); $tmp_res = $stmt->execute(array($r['album_id'])); $a[] = array('name' => $album_name, 'numOfItems' => min($tmp_res->numRows(), 10)); } diff --git a/apps/gallery/ajax/getCovers.php b/apps/gallery/ajax/getCovers.php index d56bf6fa4b..57737f2fdd 100644 --- a/apps/gallery/ajax/getCovers.php +++ b/apps/gallery/ajax/getCovers.php @@ -46,7 +46,7 @@ if( !OC_User::isLoggedIn()){ $box_size = 200; $album_name= $_GET['album_name']; -$stmt = OC_DB::prepare('SELECT file_path FROM *PREFIX*gallery_photos,*PREFIX*gallery_albums WHERE *PREFIX*gallery_albums.uid_owner = ? AND album_name = ? AND *PREFIX*gallery_photos.album_id == *PREFIX*gallery_albums.album_id'); +$stmt = OC_DB::prepare('SELECT `file_path` FROM *PREFIX*gallery_photos,*PREFIX*gallery_albums WHERE *PREFIX*gallery_albums.`uid_owner` = ? AND `album_name` = ? AND *PREFIX*gallery_photos.`album_id` = *PREFIX*gallery_albums.`album_id`'); $result = $stmt->execute(array(OC_User::getUser(), $album_name)); $numOfItems = min($result->numRows(),10); diff --git a/apps/gallery/lib_scanner.php b/apps/gallery/lib_scanner.php index fe14b68add..fcd9b0acb6 100644 --- a/apps/gallery/lib_scanner.php +++ b/apps/gallery/lib_scanner.php @@ -28,21 +28,21 @@ class OC_GALLERY_SCANNER { } $current_album['imagesCount'] = count($current_album['images']); $albums[] = $current_album; - $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE "uid_owner" = ? AND "album_name" = ?'); + $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ? AND `album_name` = ?'); $result = $stmt->execute(array(OC_User::getUser(), $current_album['name'])); if ($result->numRows() == 0 && count($current_album['images'])) { - $stmt = OC_DB::prepare('INSERT OR REPLACE INTO *PREFIX*gallery_albums ("uid_owner", "album_name") VALUES (?, ?)'); + $stmt = OC_DB::prepare('REPLACE INTO *PREFIX*gallery_albums (`uid_owner`, `album_name`) VALUES (?, ?)'); $stmt->execute(array(OC_User::getUser(), $current_album['name'])); } - $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE "uid_owner" = ? AND "album_name" = ?'); + $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ? AND `album_name` = ?'); $result = $stmt->execute(array(OC_User::getUser(), $current_album['name'])); $albumId = $result->fetchRow(); $albumId = $albumId['album_id']; foreach ($current_album['images'] as $img) { - $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE "album_id" = ? AND "file_path" = ?'); + $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE `album_id` = ? AND `file_path` = ?'); $result = $stmt->execute(array($albumId, $img)); if ($result->numRows() == 0) { - $stmt = OC_DB::prepare('INSERT OR REPLACE INTO *PREFIX*gallery_photos ("album_id", "file_path") VALUES (?, ?)'); + $stmt = OC_DB::prepare('INSERT OR REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)'); $stmt->execute(array($albumId, $img)); } } From af6eb52b5ee8616d4dc36d51956b96345d9b26fb Mon Sep 17 00:00:00 2001 From: "Michiel@unhosted" Date: Wed, 5 Oct 2011 20:01:58 +0200 Subject: [PATCH 4/7] correct wrong variable name in remoteStorage app --- apps/remoteStorage/lib_remoteStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remoteStorage/lib_remoteStorage.php b/apps/remoteStorage/lib_remoteStorage.php index 259efb0da6..5677ab3c6e 100644 --- a/apps/remoteStorage/lib_remoteStorage.php +++ b/apps/remoteStorage/lib_remoteStorage.php @@ -3,7 +3,7 @@ class OC_remoteStorage { public static function getValidTokens($ownCloudUser, $userAddress, $dataScope) { $query=OC_DB::prepare("SELECT token,appUrl FROM *PREFIX*authtoken WHERE user=? AND userAddress=? AND dataScope=? LIMIT 100"); - $result=$query->execute(array($user,$userAddress,$dataScope)); + $result=$query->execute(array($ownCloudUser,$userAddress,$dataScope)); if( PEAR::isError($result)) { $entry = 'DB Error: "'.$result->getMessage().'"
'; $entry .= 'Offending command was: '.$result->getDebugInfo().'
'; From f92fa6989e4d784f57bdbe4f9d9f9da0faa5bf47 Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Wed, 5 Oct 2011 22:28:17 +0200 Subject: [PATCH 5/7] another query fix --- apps/gallery/lib_scanner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gallery/lib_scanner.php b/apps/gallery/lib_scanner.php index fcd9b0acb6..5490c4a55a 100644 --- a/apps/gallery/lib_scanner.php +++ b/apps/gallery/lib_scanner.php @@ -42,7 +42,7 @@ class OC_GALLERY_SCANNER { $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE `album_id` = ? AND `file_path` = ?'); $result = $stmt->execute(array($albumId, $img)); if ($result->numRows() == 0) { - $stmt = OC_DB::prepare('INSERT OR REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)'); + $stmt = OC_DB::prepare('REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)'); $stmt->execute(array($albumId, $img)); } } From 08c38c8158bab4f7f6d60c778a8614739719bc7f Mon Sep 17 00:00:00 2001 From: Stephen Rees-Carter Date: Thu, 6 Oct 2011 10:30:17 +1100 Subject: [PATCH 6/7] Updating .gitignore to ignore *.geany project files. --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ea8e5bd42f..312dc0433a 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,7 @@ RCS/* # netbeans nbproject -.DS_Store \ No newline at end of file +# geany +*.geany + +.DS_Store From c853fc75a1db418b3c892f2e82e723b63489d35e Mon Sep 17 00:00:00 2001 From: Stephen Rees-Carter Date: Thu, 6 Oct 2011 10:31:05 +1100 Subject: [PATCH 7/7] BUGFIX: removed the hard-coded Continent selection for Calendar Timezones. --- apps/calendar/templates/settings.php | 50 +++++++++++++++------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 19a1a543b4..afc35bf7f3 100644 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.php @@ -11,34 +11,36 @@ OC_UTIL::addStyle('', 'jquery.multiselect'); ?>
- -
+ + - + -
- -
+ +
+
- t('Calendar CalDAV syncing address:');?> -
+ t('Calendar CalDAV syncing address:');?> +