Skip to content

Commit

Permalink
Fixed issue #10398: Stats on Global Settings Overview do not tie up w…
Browse files Browse the repository at this point in the history
…ith list under configuration drop down
  • Loading branch information
olleharstedt committed Feb 12, 2016
1 parent edb8645 commit 7cb604e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions application/core/Survey_Common_Action.php
Expand Up @@ -452,20 +452,19 @@ public function _showadminmenu()
if( !Yii::app()->user->isGuest )
{
// Default password notification
if (Yii::app()->session['pw_notify'] && Yii::app()->getConfig("debug")<2)
if (Yii::app()->session['pw_notify'] && Yii::app()->getConfig("debug") < 2)
{
Yii::app()->session['flashmessage'] = gT("Warning: You are still using the default password ('password'). Please change your password and re-login again.");
}

// Count active survey
$model = new Survey('search');
$model->active = 'Y';
$aData['dataForConfigMenu']['activesurveyscount'] = $aData['activesurveyscount'] = $model->search()->itemCount;
$aData['dataForConfigMenu']['activesurveyscount'] = $aData['activesurveyscount'] = Survey::model()->count("active = 'Y'");

// Count survey
$model->active = '';
$aData['dataForConfigMenu']['surveyscount'] = $model->search()->itemCount;
$aData['dataForConfigMenu']['surveyscount'] = Survey::model()->count();

// Count user
$aData['dataForConfigMenu']['userscount'] = count(User::model()->findAll());
$aData['dataForConfigMenu']['userscount'] = User::model()->count();

// Count tokens and deactivated surveys
$tablelist = Yii::app()->db->schema->getTableNames();
Expand Down

0 comments on commit 7cb604e

Please sign in to comment.