Skip to content

Commit

Permalink
Fixed #6801: Reporting Graph Issue
Browse files Browse the repository at this point in the history
dev: prefix can be T, D or nothing checking for not numeric now and stripping if present
  • Loading branch information
mennodekker committed Nov 5, 2012
1 parent bd5657e commit e4d6315
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/controllers/admin/statistics.php
Expand Up @@ -528,7 +528,11 @@ function graph()
$sStatisticsLanguage=sanitize_languagecode($_POST['sStatisticsLanguage']);
$oStatisticsLanguage = new Limesurvey_lang($sStatisticsLanguage);
if (isset($_POST['cmd']) && isset($_POST['id'])) {
list($qsid, $qgid, $qqid) = explode("X", substr($_POST['id'], 1), 3);
list($qsid, $qgid, $qqid) = explode("X", substr($_POST['id'], 0), 3);
if(!is_numeric(substr($qsid,0,1))) {
// Strip first char when not numeric (probably T or D)
$qsid=substr($qsid,1);
}
$qtype = substr($_POST['id'], 0, 1);
$aattr = getQuestionAttributeValues($qqid);
$field = substr($_POST['id'], 1);
Expand Down

0 comments on commit e4d6315

Please sign in to comment.