|
@@ -7,6 +7,15 @@
|
|
*/
|
|
*/
|
|
include_once('fgcf.features.inc');
|
|
include_once('fgcf.features.inc');
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * Implementation of hook_init().
|
|
|
|
+ */
|
|
|
|
+function fgcf_init() {
|
|
|
|
+ if (arg(0) == 'fgcf') {
|
|
|
|
+ drupal_add_css(drupal_get_path('module', 'fgcf') .'/theme/css/fgcf.css');
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Implementation of hook_menu().
|
|
* Implementation of hook_menu().
|
|
*/
|
|
*/
|
|
@@ -15,6 +24,20 @@ function fgcf_menu() {
|
|
|
|
|
|
$items = array();
|
|
$items = array();
|
|
|
|
|
|
|
|
+ $items['admin/settings/fg'] = array(
|
|
|
|
+ 'title' => 'France Galop',
|
|
|
|
+ 'description' => 'Réglages des modules France Galop',
|
|
|
|
+ 'access arguments' => array('administer site configuration'),
|
|
|
|
+ 'page callback' => 'drupal_get_form',
|
|
|
|
+ 'page arguments' => array('fgcf_admin_settings'),
|
|
|
|
+ 'file' => 'fgcf.admin.inc',
|
|
|
|
+ );
|
|
|
|
+ $items['admin/settings/fg/fgcf'] = array(
|
|
|
|
+ 'title' => 'Catalogue formations',
|
|
|
|
+ 'description' => 'Réglages du catalogue de formations',
|
|
|
|
+ 'type' => MENU_DEFAULT_LOCAL_TASK,
|
|
|
|
+ );
|
|
|
|
+
|
|
$items['fgcf'] = array(
|
|
$items['fgcf'] = array(
|
|
'title' => 'Catalogue formations',
|
|
'title' => 'Catalogue formations',
|
|
'page callback' => 'fgcf_page_home',
|
|
'page callback' => 'fgcf_page_home',
|
|
@@ -47,16 +70,6 @@ function fgcf_menu() {
|
|
return $items;
|
|
return $items;
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- * Implementation of hook_init().
|
|
|
|
- */
|
|
|
|
-function fgcf_init() {
|
|
|
|
- if (arg(0) == 'fgcf') {
|
|
|
|
- drupal_add_css(drupal_get_path('module', 'fgcf') .'/theme/css/fgcf.css');
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Implementation of hook_perm().
|
|
* Implementation of hook_perm().
|
|
*/
|
|
*/
|
|
@@ -358,7 +371,7 @@ function fgcf_subscribe_form_submit($form, &$form_state) {
|
|
|
|
|
|
// Prevent flooding.
|
|
// Prevent flooding.
|
|
if (flood_is_allowed('fgcg_subscribe', 10)) {
|
|
if (flood_is_allowed('fgcg_subscribe', 10)) {
|
|
- $to = variable_get('site_mail', ini_get('sendmail_from'));
|
|
|
|
|
|
+ $to = variable_get('fgcf_mail_destination', variable_get('site_mail', ini_get('sendmail_from')));
|
|
$params = array(
|
|
$params = array(
|
|
'account' => $user,
|
|
'account' => $user,
|
|
'node' => $form_state['values']['node'],
|
|
'node' => $form_state['values']['node'],
|
|
@@ -373,7 +386,7 @@ function fgcf_subscribe_form_submit($form, &$form_state) {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Implemanbtation of hook_mail().
|
|
|
|
|
|
+ * Implementation of hook_mail().
|
|
*/
|
|
*/
|
|
function fgcf_mail($key, &$message, $params) {
|
|
function fgcf_mail($key, &$message, $params) {
|
|
$language = $message['language'];
|
|
$language = $message['language'];
|