Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
7a00c793
Commit
7a00c793
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: SQL syntax error
parent
aadfca4b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/modules/mailings/framboise.modules.php
+21
-17
21 additions, 17 deletions
htdocs/core/modules/mailings/framboise.modules.php
with
21 additions
and
17 deletions
htdocs/core/modules/mailings/framboise.modules.php
+
21
−
17
View file @
7a00c793
...
...
@@ -49,10 +49,11 @@ class mailing_framboise extends MailingTargets
/**
* \brief This is the main function that returns the array of emails
* \param mailing_id Id of mailing. No need to use it.
* \param filterarray If you used the formFilter function. Empty otherwise.
* \return int <0 if error, number of emails added if ok
* This is the main function that returns the array of emails.
*
* @param int $mailing_id Id of mailing. No need to use it.
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
* @return int <0 if error, number of emails added if ok
*/
function
add_to_target
(
$mailing_id
,
$filtersarray
=
array
())
{
...
...
@@ -73,7 +74,7 @@ class mailing_framboise extends MailingTargets
}
$sql
.
=
" WHERE s.email != ''"
;
$sql
.
=
" AND s.entity = "
.
$conf
->
entity
;
if
(
$_POST
[
'filter'
])
$sql
.
=
" AND
"
.
MAIN_DB_PREFIX
.
"categorie
.rowid='"
.
$_POST
[
'filter'
]
.
"'"
;
if
(
$_POST
[
'filter'
])
$sql
.
=
" AND
c
.rowid='"
.
$_POST
[
'filter'
]
.
"'"
;
$sql
.
=
" ORDER BY s.email"
;
// Stocke destinataires dans cibles
...
...
@@ -138,11 +139,12 @@ class mailing_framboise extends MailingTargets
}
/*
*
\brief
Return here number of distinct emails returned by your selector.
/*
*
* Return here number of distinct emails returned by your selector.
* For example if this selector is used to extract 500 different
* emails from a text file, this function must return 500.
* \return int
*
* @return int Nb of recipients
*/
function
getNbOfRecipients
()
{
...
...
@@ -159,9 +161,10 @@ class mailing_framboise extends MailingTargets
}
/**
*
\brief
This is to add a form filter to provide variant of selector
* This is to add a form filter to provide variant of selector
* If used, the HTML select must be called "filter"
* \return string A html select zone
*
* @return string A html select zone
*/
function
formFilter
()
{
...
...
@@ -212,9 +215,10 @@ class mailing_framboise extends MailingTargets
/**
* \brief Can include an URL link on each record provided by selector
* shown on target page.
* \return string Url link
* Can include an URL link on each record provided by selector shown on target page.
*
* @param int $id Id of member
* @return string Url link
*/
function
url
(
$id
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment