Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Modules
easynews
Commits
9a46d1ff
Commit
9a46d1ff
authored
8 years ago
by
Antonio Savorelli
Browse files
Options
Download
Email Patches
Plain Diff
Updated to depend on "configure" module.
parent
8e15c5dc
7.x-1.x
7.x-1.0
7.x-1.0-beta5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
easynews.configure.inc
+7
-3
easynews.configure.inc
easynews.info
+1
-1
easynews.info
easynews.module
+5
-5
easynews.module
with
13 additions
and
9 deletions
+13
-9
easynews.config.inc
→
easynews.config
ure
.inc
View file @
9a46d1ff
...
...
@@ -3,7 +3,11 @@
* @file
* Variable declarations for Easy Newsletters.
*/
function
easynews_config_variable_info
()
{
/**
* Implements hook_configure_variable_info().
*/
function
easynews_configure_variable_info
()
{
$variables
=
array
(
'easynews_newsletter_footer'
=>
array
(
'group'
=>
'settings'
,
...
...
@@ -49,9 +53,9 @@ function easynews_config_variable_info() {
}
/**
* Implements hook_config_variable_defaults().
* Implements hook_config
ure
_variable_defaults().
*/
function
easynews_config_variable_defaults
()
{
function
easynews_config
ure
_variable_defaults
()
{
return
array
(
'easynews_newsletter_enable'
=>
TRUE
,
);
...
...
This diff is collapsed.
Click to expand it.
easynews.info
View file @
9a46d1ff
name = Easy Newsletters
description = Sends node-based newsletters.
dependencies[] = config
dependencies[] = config
ure
dependencies[] = entityreference
dependencies[] = date
dependencies[] = image
...
...
This diff is collapsed.
Click to expand it.
easynews.module
View file @
9a46d1ff
...
...
@@ -34,7 +34,7 @@ function easynews_menu() {
'access callback'
=>
'user_access'
,
'access arguments'
=>
array
(
'administer easynews'
),
'page callback'
=>
'drupal_get_form'
,
'page arguments'
=>
array
(
'config_settings_form'
,
'easynews'
,
'settings'
),
'page arguments'
=>
array
(
'config
ure
_settings_form'
,
'easynews'
,
'settings'
),
);
$items
[
'admin/config/system/easynews/settings'
]
=
array
(
...
...
@@ -50,7 +50,7 @@ function easynews_menu() {
'access callback'
=>
'user_access'
,
'access arguments'
=>
array
(
'administer easynews'
),
'page callback'
=>
'drupal_get_form'
,
'page arguments'
=>
array
(
'config_settings_form'
,
'easynews'
,
'newsletter'
,
t
(
'!newsletter_name settings'
,
array
(
'!newsletter_name'
=>
$group_info
[
'admin name'
])),
array
(
'list_key'
=>
$key
)),
'page arguments'
=>
array
(
'config
ure
_settings_form'
,
'easynews'
,
'newsletter'
,
t
(
'!newsletter_name settings'
,
array
(
'!newsletter_name'
=>
$group_info
[
'admin name'
])),
array
(
'list_key'
=>
$key
)),
);
}
...
...
@@ -293,10 +293,10 @@ function easynews_form_alter(&$form, &$form_state, $form_id) {
unset
(
$form
[
'easynews_email_sent'
],
$form
[
'easynews_email_sent_date'
],
$form
[
'easynews_recipient_reference'
]);
break
;
case
'config_settings_form'
:
case
'config
ure
_settings_form'
:
$args
=
$form_state
[
'build_info'
][
'args'
];
if
(
$args
[
0
]
==
'easynews'
&&
$args
[
1
]
==
'newsletter'
)
{
$form
[
'#submit'
][]
=
'easynews_config_file_save'
;
$form
[
'#submit'
][]
=
'easynews_config
ure
_file_save'
;
}
break
;
}
...
...
@@ -305,7 +305,7 @@ function easynews_form_alter(&$form, &$form_state, $form_id) {
/**
* Save header-image file as permanent.
*/
function
easynews_config_file_save
(
$form
,
&
$form_state
)
{
function
easynews_config
ure
_file_save
(
$form
,
&
$form_state
)
{
$args
=
$form_state
[
'build_info'
][
'args'
];
$group
=
$args
[
3
][
'list_key'
];
// Hack to produce a (most likely) unique number given a string
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help