Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
a874b4f1
Commit
a874b4f1
authored
7 years ago
by
Giovannoni Laurent
Browse files
Options
Downloads
Patches
Plain Diff
FIX #5628
parent
3a5e3f27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/maarch_entreprise/indexing_searching/contact_check.php
+6
-4
6 additions, 4 deletions
apps/maarch_entreprise/indexing_searching/contact_check.php
modules/avis/class/avis_controler_Abstract.php
+1
-1
1 addition, 1 deletion
modules/avis/class/avis_controler_Abstract.php
with
7 additions
and
5 deletions
apps/maarch_entreprise/indexing_searching/contact_check.php
+
6
−
4
View file @
a874b4f1
...
...
@@ -42,15 +42,17 @@ if(empty($_POST['contact_id']) || $_POST['category'] == 'outgoing'){
//IF EXTERNAL CONTACT
if
(
is_numeric
(
$_POST
[
'contact_id'
]))
{
$where
=
"status <> 'DEL' AND contact_id = "
.
$_POST
[
'contact_id'
]
.
" AND address_id = "
.
$_POST
[
'address_id'
]
.
" AND creation_date >= (select CURRENT_DATE + integer '-"
.
$_SESSION
[
'check_days_before'
]
.
"')"
;
$wherePDO
=
"status <> 'DEL' AND contact_id = ? AND address_id = ? AND creation_date >= (select CURRENT_DATE + integer '-"
.
$_SESSION
[
'check_days_before'
]
.
"')"
;
$where
=
"status <> 'DEL' AND contact_id = "
.
$_POST
[
'contact_id'
]
.
" AND address_id = "
.
$_POST
[
'address_id'
]
.
" AND (creation_date >= "
.
$db
->
current_datetime
()
.
" - INTERVAL '"
.
$_SESSION
[
'check_days_before'
]
.
"' DAY)"
;
$wherePDO
=
"status <> 'DEL' AND contact_id = ? AND address_id = ? AND (creation_date >= "
.
$db
->
current_datetime
()
.
" - INTERVAL '"
.
$_SESSION
[
'check_days_before'
]
.
"' DAY)"
;
$arrayPDO
=
array
(
$_POST
[
'contact_id'
],
$_POST
[
'address_id'
]);
//IF INTERNAL CONTACT
}
else
{
$where
=
"status <> 'DEL' AND (exp_user_id = '"
.
$_POST
[
'contact_id'
]
.
"' OR dest_user_id = '"
.
$_POST
[
'contact_id'
]
.
"') AND creation_date >=
(select CURRENT_DATE + integer
'
-
"
.
$_SESSION
[
'check_days_before'
]
.
"')"
;
$wherePDO
=
"status <> 'DEL' AND (exp_user_id = ? OR dest_user_id = ?) AND creation_date >=
(select CURRENT_DATE + integer
'
-
"
.
$_SESSION
[
'check_days_before'
]
.
"')"
;
$where
=
"status <> 'DEL' AND (exp_user_id = '"
.
$_POST
[
'contact_id'
]
.
"' OR dest_user_id = '"
.
$_POST
[
'contact_id'
]
.
"') AND
(
creation_date >=
"
.
$db
->
current_datetime
()
.
" - INTERVAL
'"
.
$_SESSION
[
'check_days_before'
]
.
"'
DAY
)"
;
$wherePDO
=
"status <> 'DEL' AND (exp_user_id = ? OR dest_user_id = ?) AND
(
creation_date >=
"
.
$db
->
current_datetime
()
.
" - INTERVAL
'"
.
$_SESSION
[
'check_days_before'
]
.
"'
DAY
)"
;
$arrayPDO
=
array
(
$_POST
[
'contact_id'
],
$_POST
[
'contact_id'
]);
}
echo
$wherePDO
;
//MERGE GLOBAL SECURITY WITH QUERY DOC
$wherePDO
=
$wherePDO
.
' AND ('
.
$whereSec
.
')'
;
...
...
This diff is collapsed.
Click to expand it.
modules/avis/class/avis_controler_Abstract.php
+
1
−
1
View file @
a874b4f1
...
...
@@ -44,7 +44,7 @@ abstract class avis_controler_Abstract
$stmt
=
$db
->
query
(
$query
,
array
(
$recommendation_limit_date
,
$resId
));
}
$query
=
"UPDATE res_letterbox SET modification_date =
CURRENT_DATE
where res_id = ?"
;
$query
=
"UPDATE res_letterbox SET modification_date =
"
.
$db
->
current_datetime
()
.
"
where res_id = ?"
;
$stmt
=
$db
->
query
(
$query
,
array
(
$resId
));
}
...
...
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