Skip to content

Commit

Permalink
Fixed issue #4005: Number of active and deactivated surveys is not co…
Browse files Browse the repository at this point in the history
…rrectly displayed

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8198 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Dec 23, 2009
1 parent 9472999 commit 96c3c56
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions admin/globalsettings.php
Expand Up @@ -412,7 +412,7 @@ function checksettings()
//GET NUMBER OF SURVEYS
$query = "SELECT count(sid) FROM ".db_table_name('surveys');
$surveycount=$connect->GetOne($query); //Checked
$query = "SELECT count(sid FROM ".db_table_name('surveys')." WHERE active='Y'";
$query = "SELECT count(sid) FROM ".db_table_name('surveys')." WHERE active='Y'";
$activesurveycount=$connect->GetOne($query); //Checked
$query = "SELECT count(users_name) FROM ".db_table_name('users');
$usercount = $connect->GetOne($query); //Checked
Expand All @@ -423,16 +423,15 @@ function checksettings()
$tablelist = $connect->MetaTables();
foreach ($tablelist as $table)
{
$stlength=strlen($dbprefix).strlen("old");
if (substr($table, 0, $stlength+strlen("_tokens")) == $dbprefix."old_tokens")
if (strpos($table,$dbprefix."old_tokens_")!==false)
{
$oldtokenlist[]=$table;
}
elseif (substr($table, 0, strlen($dbprefix) + strlen("tokens")) == $dbprefix."tokens")
elseif (strpos($table,$dbprefix."tokens_")!==false)
{
$tokenlist[]=$table;
}
elseif (substr($table, 0, $stlength) == $dbprefix."old")
elseif (strpos($table,$dbprefix."old_survey_")!==false)
{
$oldresultslist[]=$table;
}
Expand Down Expand Up @@ -468,7 +467,7 @@ function checksettings()
. "</tr>\n"
. "<tr>\n"
. "<td align='right'>\n"
. "<strong>".$clang->gT("Deactivated surveys").":</strong>\n"
. "<strong>".$clang->gT("Deactivated result tables").":</strong>\n"
. "</td><td>$deactivatedsurveys</td>\n"
. "</tr>\n"
. "<tr>\n"
Expand Down

0 comments on commit 96c3c56

Please sign in to comment.