Skip to content

Commit ead3509

Browse files
authored
Merge pull request #7 from ali-ichk/Feed
Feed: Replaced the deprecated getRoleCategory() method
2 parents c120824 + 65e5b6c commit ead3509

7 files changed

Lines changed: 16 additions & 18 deletions

File tree

Feed/CHANGEDB.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,9 @@
7373
//v1.2.02
7474
++$count;
7575
$sql[$count][0] = '1.2.02';
76+
$sql[$count][1] = "";
77+
78+
//v1.3.00
79+
++$count;
80+
$sql[$count][0] = '1.3.00';
7681
$sql[$count][1] = "";

Feed/CHANGELOG.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
CHANGELOG
22
=========
3+
v1.3.00
4+
-------
5+
Replaced the deprecated getRoleCategory() method
6+
37
v1.2.02
48
-------
59
Fixed JS bug introduced in ownership transfer

Feed/feed_view_ajax.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
require_once './src/Library/RollingCurl/Request.php';
3030

3131
$output = '';
32-
33-
$category = getRoleCategory($session->get('gibbonRoleIDCurrent'), $connection2);
34-
32+
$category = $session->get('gibbonRoleIDCurrentCategory');
3533
$gibbonPersonID = $_GET['gibbonPersonID'] ?? null;
3634

3735
if (is_null($gibbonPersonID) or $gibbonPersonID=='') {

Feed/hook_dashboard_feedView.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,10 @@
2222
$returnInt = null;
2323

2424
//Only include module include if it is not already included (which it may be been on the index page)
25-
$included = false;
26-
$includes = get_included_files();
27-
foreach ($includes as $include) {
28-
if ($include == $session->get('absolutePath').'/modules/Feed/moduleFunctions.php') {
29-
$included = true;
30-
}
31-
}
32-
if ($included == false) {
33-
include './modules/Feed/moduleFunctions.php';
34-
}
25+
require_once $session->get('absolutePath').'/modules/Feed/moduleFunctions.php';
3526

3627
if (isActionAccessible($guid, $connection2, '/modules/Feed/feed_view.php') == false) {
37-
//Acess denied
28+
// Access denied
3829
$returnInt .= "<div class='error'>";
3930
$returnInt .= 'You do not have access to this action.';
4031
$returnInt .= '</div>';

Feed/manifest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
$entryURL = 'feed_view.php';
2828
$type = 'Additional';
2929
$category = 'Other';
30-
$version = '1.2.02';
30+
$version = '1.3.00';
3131
$author = "Gibbon Foundation";
3232
$url = "https://gibbonedu.org";
3333

Feed/moduleFunctions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ function getFeed($connection2, $guid, $gibbonPersonID)
2424
global $session;
2525

2626
$output = '';
27-
28-
$category = getRoleCategory($session->get('gibbonRoleIDCurrent'), $connection2);
27+
28+
$category = $session->get('gibbonRoleIDCurrentCategory');
2929
$output .= '<p>';
3030
if ($category == "Staff") {
3131
$output .= __('Shown below is a list of the most recent 20 posts, drawn from your own website, and that of class and student websites for your form groups.') ;

Feed/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
/**
2323
* Sets version information.
2424
*/
25-
$moduleVersion = '1.2.02';
25+
$moduleVersion = '1.3.00';
2626
$coreVersion = '22.0.00';

0 commit comments

Comments
 (0)