mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
checked for existence of result set before applying RecordCount method
New questionnaire form has larger text boxes for entering data - and hides entry when rs not required
This commit is contained in:
@@ -496,7 +496,7 @@ function display_calendar($respondent_id, $questionnaire_id, $year = false, $mon
|
||||
AND MONTH(CONVERT_TZ(s.start,'UTC',r.Time_zone_name)) = '{$Day->thisMonth()}'
|
||||
AND YEAR(CONVERT_TZ(s.start,'UTC',r.Time_zone_name)) = '{$Day->thisYear()}'");
|
||||
|
||||
if ($rs->RecordCount() == 0)
|
||||
if (!empty($rs) && $rs->RecordCount() == 0)
|
||||
{
|
||||
echo ( "<td class=\"notavailable $today\">".$Day->thisDay()."</td>\n" );
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ function create_limesurvey_questionnaire($title)
|
||||
$isquery = "SELECT sid FROM ".db_table_name('surveys')." WHERE sid=$surveyid";
|
||||
$isresult = $ldb->Execute($isquery);
|
||||
}
|
||||
while ($isresult->RecordCount()>0);
|
||||
while (!empty($isresult) && $isresult->RecordCount() > 0);
|
||||
|
||||
$isquery = "INSERT INTO ". LIME_PREFIX ."surveys\n"
|
||||
. "(sid, owner_id, admin, active, useexpiry, expires, "
|
||||
|
||||
Reference in New Issue
Block a user