Skip to content

Commit 9217b5c

Browse files
committed
Show RSS feed of a selected organization #1628
1 parent 609ff11 commit 9217b5c

File tree

5 files changed

+20
-25
lines changed

5 files changed

+20
-25
lines changed

adm_program/modules/announcements/rss_announcements.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
*
1111
* Parameters:
1212
*
13-
* org_uuid - Show only announcements of this organization
13+
* organization_short_name : short name of the organization whose announcements should be shown
1414
***********************************************************************************************
1515
*/
1616
require_once(__DIR__ . '/../../system/common.php');
1717

18-
$getOrgUuid = admFuncVariableIsValid($_GET, 'org_uuid', 'string');
18+
$getOrganizationShortName = admFuncVariableIsValid($_GET, 'organization_short_name', 'string');
1919

2020
// Check if RSS is active...
2121
if (!$gSettingsManager->getBool('enable_rss')) {
@@ -33,9 +33,8 @@
3333

3434
$announcements = new ModuleAnnouncements();
3535

36-
if ($getOrgUuid !== '') {
37-
$organization = new Organization($gDb);
38-
$organization->readDataByUuid($getOrgUuid);
36+
if ($getOrganizationShortName !== '') {
37+
$organization = new Organization($gDb, $getOrganizationShortName);
3938
$organizationName = $organization->getValue('org_long_name');
4039
$gCurrentUser->setOrganization($organization->getValue('org_id'));
4140
} else {

adm_program/modules/events/events_rss.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
*
1111
* Parameters:
1212
*
13-
* org_uuid - Show only announcements of this organization
13+
* organization_short_name : short name of the organization whose events should be shown
1414
* *********************************************************************************************
1515
*/
1616
require_once(__DIR__ . '/../../system/common.php');
1717

18-
$getOrgUuid = admFuncVariableIsValid($_GET, 'org_uuid', 'string');
18+
$getOrganizationShortName = admFuncVariableIsValid($_GET, 'organization_short_name', 'string');
1919

2020
// Check if RSS is active...
2121
if (!$gSettingsManager->getBool('enable_rss')) {
@@ -30,9 +30,8 @@
3030
// => EXIT
3131
}
3232

33-
if ($getOrgUuid !== '') {
34-
$organization = new Organization($gDb);
35-
$organization->readDataByUuid($getOrgUuid);
33+
if ($getOrganizationShortName !== '') {
34+
$organization = new Organization($gDb, $getOrganizationShortName);
3635
$organizationName = $organization->getValue('org_long_name');
3736
$gCurrentUser->setOrganization($organization->getValue('org_id'));
3837
} else {

adm_program/modules/guestbook/rss_guestbook.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
*
1111
* Parameters:
1212
*
13-
* org_uuid - Show only announcements of this organization
13+
* organization_short_name : short name of the organization whose guestbook entries should be shown
1414
* *********************************************************************************************
1515
*/
1616
require_once(__DIR__ . '/../../system/common.php');
1717

18-
$getOrgUuid = admFuncVariableIsValid($_GET, 'org_uuid', 'string');
18+
$getOrganizationShortName = admFuncVariableIsValid($_GET, 'organization_short_name', 'string');
1919

2020
// Check if RSS is active...
2121
if (!$gSettingsManager->getBool('enable_rss')) {
@@ -30,9 +30,8 @@
3030
// => EXIT
3131
}
3232

33-
if ($getOrgUuid !== '') {
34-
$organization = new Organization($gDb);
35-
$organization->readDataByUuid($getOrgUuid);
33+
if ($getOrganizationShortName !== '') {
34+
$organization = new Organization($gDb, $getOrganizationShortName);
3635
$organizationName = $organization->getValue('org_long_name');
3736
$organizationID = $organization->getValue('org_id');
3837
} else {

adm_program/modules/links/rss_links.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
*
1111
* Parameters:
1212
*
13-
* org_uuid - Show only announcements of this organization
13+
* organization_short_name : short name of the organization whose weblinks should be shown
1414
* *********************************************************************************************
1515
*/
1616
require_once(__DIR__ . '/../../system/common.php');
1717

18-
$getOrgUuid = admFuncVariableIsValid($_GET, 'org_uuid', 'string');
18+
$getOrganizationShortName = admFuncVariableIsValid($_GET, 'organization_short_name', 'string');
1919

2020
// Check if RSS is active...
2121
if (!$gSettingsManager->getBool('enable_rss')) {
@@ -31,9 +31,8 @@
3131
// => EXIT
3232
}
3333

34-
if ($getOrgUuid !== '') {
35-
$organization = new Organization($gDb);
36-
$organization->readDataByUuid($getOrgUuid);
34+
if ($getOrganizationShortName !== '') {
35+
$organization = new Organization($gDb, $getOrganizationShortName);
3736
$organizationName = $organization->getValue('org_long_name');
3837
$organizationID = $organization->getValue('org_id');
3938
} else {

adm_program/modules/photos/rss_photos.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
*
1111
* Parameters:
1212
*
13-
* org_uuid - Show only announcements of this organization
13+
* organization_short_name : short name of the organization whose photos should be shown
1414
* *********************************************************************************************
1515
*/
1616
require_once(__DIR__ . '/../../system/common.php');
1717

18-
$getOrgUuid = admFuncVariableIsValid($_GET, 'org_uuid', 'string');
18+
$getOrganizationShortName = admFuncVariableIsValid($_GET, 'organization_short_name', 'string');
1919

2020
// check if module is active
2121
if (!$gSettingsManager->getBool('enable_rss')) {
@@ -33,9 +33,8 @@
3333
require(__DIR__ . '/../../system/login_valid.php');
3434
}
3535

36-
if ($getOrgUuid !== '') {
37-
$organization = new Organization($gDb);
38-
$organization->readDataByUuid($getOrgUuid);
36+
if ($getOrganizationShortName !== '') {
37+
$organization = new Organization($gDb, $getOrganizationShortName);
3938
$organizationName = $organization->getValue('org_long_name');
4039
$organizationID = $organization->getValue('org_id');
4140
} else {

0 commit comments

Comments
 (0)