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
60a384ee
Commit
60a384ee
authored
6 years ago
by
Pegane Nestor
Browse files
Options
Downloads
Patches
Plain Diff
FIX #7045 modified content in new session variable
parent
3c4157d7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/maarch_entreprise/actions/index_mlb.php
+3
-3
3 additions, 3 deletions
apps/maarch_entreprise/actions/index_mlb.php
apps/maarch_entreprise/getIframeTemplateContent.php
+8
-9
8 additions, 9 deletions
apps/maarch_entreprise/getIframeTemplateContent.php
with
11 additions
and
12 deletions
apps/maarch_entreprise/actions/index_mlb.php
+
3
−
3
View file @
60a384ee
...
@@ -1100,12 +1100,11 @@ function check_docserver($collId)
...
@@ -1100,12 +1100,11 @@ function check_docserver($collId)
if
(
$core
->
is_module_loaded
(
'templates'
)
if
(
$core
->
is_module_loaded
(
'templates'
)
&&
$_SESSION
[
'upfile'
][
'format'
]
==
'maarch'
&&
$_SESSION
[
'upfile'
][
'format'
]
==
'maarch'
)
{
)
{
if
(
!
isset
(
$_SESSION
[
'template_content'
])
if
(
!
isset
(
$_SESSION
[
'template_
modified_
content'
])
||
$_SESSION
[
'template_content_same'
]
||
$_SESSION
[
'template_content_same'
]
)
{
)
{
$_SESSION
[
'action_error'
]
=
_TEMPLATE
.
' '
.
_IS_EMPTY
;
$_SESSION
[
'action_error'
]
=
_TEMPLATE
.
' '
.
_IS_EMPTY
;
unset
(
$_SESSION
[
'template_content_same'
]);
unset
(
$_SESSION
[
'template_content_same'
]);
return
false
;
return
false
;
}
}
if
(
if
(
...
@@ -1122,9 +1121,10 @@ function check_docserver($collId)
...
@@ -1122,9 +1121,10 @@ function check_docserver($collId)
return
false
;
return
false
;
}
}
fwrite
(
$myfile
,
$_SESSION
[
'template_content'
]);
fwrite
(
$myfile
,
$_SESSION
[
'template_
modified_
content'
]);
fclose
(
$myfile
);
fclose
(
$myfile
);
$_SESSION
[
'upfile'
][
'size'
]
=
filesize
(
$tmpPath
);
$_SESSION
[
'upfile'
][
'size'
]
=
filesize
(
$tmpPath
);
$_SESSION
[
'template_modified_content'
]
=
''
;
}
}
}
}
if
(
$_SESSION
[
'origin'
]
==
'scan'
)
{
if
(
$_SESSION
[
'origin'
]
==
'scan'
)
{
...
...
This diff is collapsed.
Click to expand it.
apps/maarch_entreprise/getIframeTemplateContent.php
+
8
−
9
View file @
60a384ee
...
@@ -19,21 +19,20 @@
...
@@ -19,21 +19,20 @@
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
*/
//Remove html tags to avoid empty space
//Remove html tags to avoid empty space
$
_SESSION
[
't
emplate
_c
ontent
'
]
=
trim
(
str_replace
(
$
sessionT
emplate
C
ontent
=
trim
(
str_replace
(
array
(
' '
,
'<p>'
,
'</p>'
),
array
(
' '
,
'<p>'
,
'</p>'
),
''
,
''
,
$_SESSION
[
'template_content'
]
$_SESSION
[
'template_content'
]
));
));
$
_SESSION
[
't
emplate
_c
ontent
'
]
=
strip_tags
(
$
_SESSION
[
't
emplate
_c
ontent
'
]
);
$
sessionT
emplate
C
ontent
=
strip_tags
(
$
sessionT
emplate
C
ontent
);
$
_SESSION
[
't
emplate
_c
ontent
'
]
=
trim
(
preg_replace
(
$
sessionT
emplate
C
ontent
=
trim
(
preg_replace
(
'/\s*/m'
,
'/\s*/m'
,
''
,
''
,
$
_SESSION
[
't
emplate
_c
ontent
'
]
));
$
sessionT
emplate
C
ontent
));
$sessionTemplateContent
=
utf8_encode
(
html_entity_decode
(
$
_SESSION
[
't
emplate
_c
ontent
'
]
));
$sessionTemplateContent
=
utf8_encode
(
html_entity_decode
(
$
sessionT
emplate
C
ontent
));
$requestTemplateContent
=
utf8_encode
(
html_entity_decode
(
strip_tags
(
$_REQUEST
[
'template_content'
])));
$requestTemplateContent
=
utf8_encode
(
html_entity_decode
(
strip_tags
(
$_REQUEST
[
'template_content'
])));
//var_dump($sessionTemplateContent);var_dump($requestTemplateContent);
$sessionTemplateContent
=
trim
(
str_replace
(
$sessionTemplateContent
=
trim
(
str_replace
(
"Â"
,
"Â"
,
""
,
""
,
...
@@ -84,9 +83,9 @@ if ($sessionTemplateContent == $requestTemplateContent || empty($sessionTemplate
...
@@ -84,9 +83,9 @@ if ($sessionTemplateContent == $requestTemplateContent || empty($sessionTemplate
$_SESSION
[
'template_content_same'
]
=
true
;
$_SESSION
[
'template_content_same'
]
=
true
;
echo
"{status : '1, responseText : same content ! '}"
;
echo
"{status : '1, responseText : same content ! '}"
;
}
else
{
}
else
{
$_SESSION
[
'template_content'
]
=
$_REQUEST
[
'template_content'
];
$_SESSION
[
'template_
modified_
content'
]
=
$_REQUEST
[
'template_content'
];
$_SESSION
[
'template_content'
]
=
str_replace
(
'[dates]'
,
date
(
'd-m-Y'
),
$_SESSION
[
'template_content'
]);
$_SESSION
[
'template_
modified_
content'
]
=
str_replace
(
'[dates]'
,
date
(
'd-m-Y'
),
$_SESSION
[
'template_
modified_
content'
]);
$_SESSION
[
'template_content'
]
=
str_replace
(
'[time]'
,
date
(
'G:i:s'
),
$_SESSION
[
'template_content'
]);
$_SESSION
[
'template_
modified_
content'
]
=
str_replace
(
'[time]'
,
date
(
'G:i:s'
),
$_SESSION
[
'template_
modified_
content'
]);
echo
"{status : '0, responseText : "
.
addslashes
(
functions
::
xssafe
(
$_REQUEST
[
'template_content'
]))
.
"'}"
;
echo
"{status : '0, responseText : "
.
addslashes
(
functions
::
xssafe
(
$_REQUEST
[
'template_content'
]))
.
"'}"
;
}
}
...
...
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