|
@@ -604,7 +604,12 @@ class learnpath {
|
|
|
if ($publicated_on == '0000-00-00 00:00:00' || empty($publicated_on)) {
|
|
|
//by default the publication date is the same that the creation date
|
|
|
//The behaviour above was changed due BT#2800
|
|
|
- $publicated_on = '';
|
|
|
+ global $_custom;
|
|
|
+ if (isset($_custom['lps_hidden_when_no_start_date']) && $_custom['lps_hidden_when_no_start_date']) {
|
|
|
+ $publicated_on = '';
|
|
|
+ } else {
|
|
|
+ $publicated_on = api_get_utc_datetime();
|
|
|
+ }
|
|
|
} else {
|
|
|
$publicated_on = Database::escape_string(api_get_utc_datetime($publicated_on));
|
|
|
}
|
|
@@ -2013,11 +2018,13 @@ class learnpath {
|
|
|
}
|
|
|
|
|
|
//Blocking empty start times see BT#2800
|
|
|
- /*
|
|
|
- if (empty($row['publicated_on']) || $row['publicated_on'] == '0000-00-00 00:00:00') {
|
|
|
- //api_not_allowed();
|
|
|
- $is_visible = false;
|
|
|
- }*/
|
|
|
+ global $_custom;
|
|
|
+ if (isset($_custom['lps_hidden_when_no_start_date']) && $_custom['lps_hidden_when_no_start_date']) {
|
|
|
+ if (empty($row['publicated_on']) || $row['publicated_on'] == '0000-00-00 00:00:00') {
|
|
|
+ //api_not_allowed();
|
|
|
+ $is_visible = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (!empty($row['expired_on']) && $row['expired_on'] != '0000-00-00 00:00:00') {
|
|
|
if ($now > api_strtotime($row['expired_on'], 'UTC')) {
|