Show the portal main news + news for the current URL see BT#4794

skala
Julio Montoya 12 years ago
parent 2eaeecd39e
commit 77319a1cd7
  1. 4
      main/inc/lib/main_api.lib.php
  2. 7
      main/inc/lib/system_announcements.lib.php

@ -5778,6 +5778,10 @@ function api_get_multiple_access_url() {
return false;
}
function api_is_multiple_url_enabled() {
return api_get_multiple_access_url();
}
/**
* Returns a md5 unique id
* @todo add more parameters

@ -610,7 +610,12 @@ class SystemAnnouncementManager {
if (isset($id) && !empty($id)) {
$id = intval($id);
$sql .= " AND id = $id ";
$sql .= " AND id = $id ";
}
if (api_is_multiple_url_enabled()) {
$current_url_id = api_get_current_access_url_id();
$sql .= " AND access_url_id IN ('1', '$current_url_id') ";
}
$sql .= " ORDER BY date_start DESC";

Loading…
Cancel
Save