Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit 954c6d4

Browse files
Merge branch 'hotfix/CEP-757'
2 parents a83a06c + 650e70c commit 954c6d4

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

culturefeed.helpers.inc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ function culturefeed_create_user($cf_account, $user = NULL) {
5858
if (!$cf_account || empty($cf_account->nick)) {
5959
return FALSE;
6060
}
61-
62-
$uid = db_query("SELECT uid FROM {culturefeed_user} cfu WHERE cfu.uid = :uid", array(':uid' => $user->uid))->fetchField();
6361

64-
if (isset($user->uid) && $user->uid && $user->uid != $uid) {
62+
if (isset($user->uid) && $user->uid) {
6563
// User is already Drupaluser, so map his Drupal and CultureFeed account
66-
$account = $user;
64+
$uid = db_query("SELECT uid FROM {culturefeed_user} cfu WHERE cfu.uid = :uid", array(':uid' => $user->uid))->fetchField();
65+
if ($user->uid != $uid) {
66+
$account = $user;
67+
}
6768
}
6869
else {
6970

culturefeed_pages/includes/helpers.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ function culturefeed_pages_get_activities_from_page(CultureFeed_Cdb_Item_Page $p
375375
$parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('type:event OR type:production');
376376
$parameters[] = new \CultuurNet\Search\Parameter\Query('"' . $page->getId() . '"');
377377
$parameters[] = new \CultuurNet\Search\Parameter\Start($page_nr);
378+
$parameters[] = new \CultuurNet\Search\Parameter\Sort('startdate', 'asc');
378379

379380
try {
380381
return culturefeed_get_search_service()->search($parameters);

lib/Drupal/DrupalCultureFeedBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ protected static function setAvailableCategories(CultureFeed_User $user) {
114114
if (!empty($pageFollowing)) {
115115
foreach ($user->following as $key => $following) {
116116

117-
$categories = $membership->page->getCategories();
117+
$categories = $following->page->getCategories();
118118

119119
// Set a flag to indicate this page can be used.
120120
$use = FALSE;

0 commit comments

Comments
 (0)