From 56464ee271758df7632dd1d6b763a4cee936dec4 Mon Sep 17 00:00:00 2001 From: Menno Dekker Date: Wed, 28 Nov 2012 15:16:28 +0100 Subject: [PATCH] Fixed #6975: Non superadmin can not see shared panel --- application/controllers/admin/participantsaction.php | 3 ++- application/models/User.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/admin/participantsaction.php b/application/controllers/admin/participantsaction.php index 8abfead06b5..7bf760b36b6 100644 --- a/application/controllers/admin/participantsaction.php +++ b/application/controllers/admin/participantsaction.php @@ -218,6 +218,7 @@ function sharePanel() */ function getShareInfo_json() { + $aData = new stdClass(); $aData->page = 1; // If super administrator all the share info in the links table will be shown @@ -242,7 +243,7 @@ function getShareInfo_json() // otherwise only the shared participants by that user else { - $records = User::model()->getParticipantShared(Yii::app()->session['loginID']); + $records = Participants::model()->getParticipantShared(Yii::app()->session['loginID']); $aData->records = count($records); $aData->total = ceil($aData->records / 10); $i = 0; diff --git a/application/models/User.php b/application/models/User.php index 269f5ef5592..d20032ac270 100644 --- a/application/models/User.php +++ b/application/models/User.php @@ -21,7 +21,7 @@ class User extends CActiveRecord * @static * @access public * @param string $class - * @return CActiveRecord + * @return User */ public static function model($class = __CLASS__) {