From ef8143f65a02c1779abddd6eefb2f668a9878d8c Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 5 Apr 2018 17:06:03 -0500 Subject: [PATCH] Minor - Format code - refs BT#14182 --- main/lp/lp_edit.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/main/lp/lp_edit.php b/main/lp/lp_edit.php index ad8b93f35e..9af3b5c9ee 100755 --- a/main/lp/lp_edit.php +++ b/main/lp/lp_edit.php @@ -8,7 +8,7 @@ use ChamiloSession as Session; * * @package chamilo.learnpath * - * @author Yannick Warnier + * @author Yannick Warnier */ require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; @@ -106,7 +106,8 @@ $form->applyFilter('lp_author', 'html_filter'); // LP image if (strlen($learnPath->get_preview_image()) > 0) { - $show_preview_image = 'get_preview_image().'>'; + $show_preview_image = 'get_preview_image().'>'; $form->addElement('label', get_lang('ImagePreview'), $show_preview_image); $form->addElement('checkbox', 'remove_picture', null, get_lang('DelImage')); } @@ -241,8 +242,12 @@ if ($enableLpExtraFields) { '; } -$defaults['publicated_on'] = !empty($publicated_on) && $publicated_on !== '0000-00-00 00:00:00' ? api_get_local_time($publicated_on) : null; -$defaults['expired_on'] = (!empty($expired_on)) ? api_get_local_time($expired_on) : date('Y-m-d 12:00:00', time() + 84600); +$defaults['publicated_on'] = !empty($publicated_on) && $publicated_on !== '0000-00-00 00:00:00' + ? api_get_local_time($publicated_on) + : null; +$defaults['expired_on'] = (!empty($expired_on)) + ? api_get_local_time($expired_on) + : date('Y-m-d 12:00:00', time() + 84600); $defaults['subscribe_users'] = $learnPath->getSubscribeUsers(); $defaults['skills'] = array_keys($skillList); $form->setDefaults($defaults);