non security modules update

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-20 16:32:07 +02:00
parent 6a8d30db08
commit 37fbabab56
466 changed files with 32690 additions and 9652 deletions

View File

@@ -8,15 +8,15 @@
/**
* Generates the settings form for the FAQ module.
*
* @param $op
* @param string $op
* Default value is NULL; determines what are the permissions of the current
* user on the FAQ.
* @return
*
* @return string
* The output, which contains the HTML code for the settings form generated by
* drupal_get_form() function.
*/
function faq_settings_page($op = NULL) {
$output = drupal_get_form('faq_general_settings_form');
return $output;
@@ -25,7 +25,7 @@ function faq_settings_page($op = NULL) {
/**
* Define a form to edit the page header and descriptive text.
*
* @return
* @return array
* The general settings form code stored in the $form variable, before
* converted to HTML.
*/
@@ -48,7 +48,12 @@ function faq_general_settings_form($form) {
$form['faq_custom_breadcrumbs'] = array(
'#type' => 'checkbox',
'#title' => t('Create custom breadcrumbs for the FAQ'),
'#description' => t('This option set the breadcrumb path to "%home > %faqtitle > category trail".', array('%home' => t('Home'), '%faqtitle' => variable_get('faq_title', 'Frequently Asked Questions'))),
'#description' => t('This option set the breadcrumb path to "%home > %faqtitle > category trail".',
array(
'%home' => t('Home'),
'%faqtitle' => variable_get('faq_title', 'Frequently Asked Questions'),
)
),
'#default_value' => variable_get('faq_custom_breadcrumbs', TRUE),
);
@@ -58,7 +63,7 @@ function faq_general_settings_form($form) {
/**
* Define the elements for the FAQ Settings page - Questions tab.
*
* @return
* @return array
* The form code inside the $form array.
*/
function faq_questions_settings_form($form, &$form_state) {
@@ -259,7 +264,7 @@ function faq_questions_settings_form($form, &$form_state) {
/**
* Define the elements for the FAQ Settings page - categories tab.
*
* @return
* @return array
* The form code inside the $form array.
*/
function faq_categories_settings_form($form, &$form_state) {
@@ -459,9 +464,10 @@ function faq_categories_settings_form_submit($form, &$form_state) {
/**
* Define the elements for the FAQ Settings page - order tab.
*
* @param $form_state
* @param array $form_state
* Store the submitted form values.
* @return
*
* @return array
* The form code, before being converted to HTML format.
*/
function faq_order_settings_form($form, $form_state, $category = NULL) {
@@ -541,7 +547,7 @@ function faq_order_settings_form($form, $form_state, $category = NULL) {
// $default_weight is an integer.
$query->addExpression("COALESCE(w.weight, $default_weight)", 'effective_weight');
// Doesn't work in Postgres.
//$query->addExpression('COALESCE(w.weight, CAST(:default_weight as SIGNED))', 'effective_weight', array(':default_weight' => $default_weight));
// $query->addExpression('COALESCE(w.weight, CAST(:default_weight as SIGNED))', 'effective_weight', array(':default_weight' => $default_weight));
if (empty($category)) {
$category = 0;
@@ -594,16 +600,16 @@ function faq_order_settings_form($form, $form_state, $category = NULL) {
);
}
return $form;
}
/**
* Function set the rebuild of the form in the FAQ Settings - Weight tab.
*
* @param $form
* @param array $form
* Array, containing the form structure.
* @param &$form_state
*
* @param array &$form_state
* The 'rebuild' key inside $form_state['rebuild'] structure, overrides the
* 'redirect' key: when it is set to TRUE, the form will be rebuilt from
* scratch and displayed on screen.
@@ -615,9 +621,10 @@ function faq_order_settings_choose_cat_form_submit($form, &$form_state) {
/**
* Save the options set by the user in the FAQ Settings - Weight tab.
*
* @param $form
* @param array $form
* Array, containing the form structure.
* @param &$form_state
*
* @param array &$form_state
* $form_state['values'] stores the submitted values from the form.
*/
function faq_order_settings_reorder_form_submit($form, &$form_state) {
@@ -663,4 +670,3 @@ function faq_order_settings_reorder_form_submit($form, &$form_state) {
drupal_set_message(t('Configuration has been updated.'));
}
}