Skip to content

Commit

Permalink
remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-Ngr committed Dec 11, 2024
1 parent a5c42cd commit b2895d8
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions htdocs/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,7 @@
}
// Some value of modulepart can be used to get resources that are public so no login are required.
// Keep $_GET here, GETPOST is not available yet
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) {
if (!defined("NOLOGIN")) {
define("NOLOGIN", 1);
}
if (!defined("NOCSRFCHECK")) {
define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
}
if (!defined("NOIPCHECK")) {
define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
}
}

// Deactivate checks for documents when coming from ticket public interface.
if (
isset($_GET["modulepart"])
&& $_GET["modulepart"] == 'ticket'
) {
if (isset($_GET["modulepart"]) && in_array($_GET["modulepart"], ['medias', 'ticket'])) {
if (!defined("NOLOGIN")) {
define("NOLOGIN", 1);
}
Expand Down

0 comments on commit b2895d8

Please sign in to comment.