0) { while ($topl = ocsql_fetch_assoc($topr)) { $topicAR[$topl['topicid']] = $topl['topicname']; } } // Hooks if (oc_hookSet('committee-advocate-preinc')) { foreach ($GLOBALS['OC_hooksAR']['committee-advocate-preinc'] as $v) { require_once $v; } } if (!isset($mod_oc_customforms_customAdvForm) || (!$mod_oc_customforms_customAdvForm)) { // skip if we have a custom form $OC_advocateQuestionsAR = array( 'adv_recommendation' => array( 'name' => oc_('Recommendation'), 'short' => oc_('Recommendation'), 'note' => '', 'type' => 'radio', 'display' => 'newline', 'required' => false, 'longlabel' => true, 'usekey' => false, 'values' => $accValues ), 'adv_comments' => array( 'name' => oc_('Committee Comments'), 'short' => oc_('Committee Comments'), 'note' => oc_('Reasons must be included for all submissions, because they help us determine what to do when reviewers disagree with each other.'), 'longlabel' => true, 'type' => 'textarea' ) ); // Set up fieldset $OC_advocateQuestionsFieldsetAR = array( 'fs_advocate' => array( 'fieldset' => '', 'note' => '', 'fields' => array_keys($OC_advocateQuestionsAR) ) ); } // if ! custom form if (oc_hookSet('committee-advocate-inc')) { foreach ($GLOBALS['OC_hooksAR']['committee-advocate-inc'] as $v) { require_once $v; } } // Make updates if not customforms edit if (! isset($mod_oc_customforms_edit) || ! $mod_oc_customforms_edit) { // Update valuetypes foreach ($OC_advocateQuestionsAR as $sfk => $sf) { if (isset($sf['valuetype']) && !empty($sf['valuetype']) && ($sf['valuetype'] != 'custom')) { switch($sf['valuetype']) { case 'country': require_once OCC_COUNTRY_FILE; $OC_advocateQuestionsAR[$sfk]['values'] = $GLOBALS['OC_countryAR']; break; case 'topic': $OC_advocateQuestionsAR[$sfk]['values'] = $topicAR; break; default: // lib file require_once OCC_LIB_DIR . $sf['valuetype'] . '.inc'; $OC_advocateQuestionsAR[$sfk]['values'] = $GLOBALS['OC_' . $sf['valuetype'] . 'AR']; break; } } } }