diff --git a/.gitignore b/.gitignore index b1a74061cf..ece8fb8ced 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ +# Chamilo 1.x + +app +courses +web/assets/* + # Cache directories var/cache/* @@ -9,15 +15,8 @@ var/log/* /node_modules/ # Chamilo configuration -/app/config/parameters.yml -/app/config/add_course.conf.php -/app/config/auth.conf.php -/app/config/course_info.conf.php -/app/config/events.conf.php -/app/config/mail.conf.php -/app/config/profile.conf.php /config/configuration.php -/app/config/configuration.php + /main/inc/conf/configuration.php # Courses @@ -25,7 +24,6 @@ var/courses/* !var/courses/.gitkeep # Home -app/home/* components/* # Upload content @@ -53,7 +51,6 @@ plugin/vchamilo/templates/* # Stuff updated through composer - Remove just before release vendor -web/assets/* ###> symfony/framework-bundle ### .env diff --git a/composer.json b/composer.json index 4eae94cc80..4d4f4532f7 100755 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "E-learning and collaboration software", "type": "project", "homepage": "http://www.chamilo.org", - "license": "GPL-3.0", + "license": "GPL-3.0-or-later", "support": { "forum": "https://chamilo.org/forum", "irc": "irc://irc.freenode.org/chamilo", @@ -13,8 +13,7 @@ }, "autoload": { "psr-4": { - "Chamilo\\": "src/", - "Application\\": "app/" + "Chamilo\\": "src/" }, "classmap": [ "main/auth", @@ -71,7 +70,6 @@ "symfony/annotations-pack": "^1.0", "symfony/webpack-encore-pack": "^1.0", "symfony/apache-pack": "^1.0", - "symfony/var-dumper": "^4.0", "apy/datagrid-bundle" : "dev-master", @@ -103,7 +101,6 @@ "sunra/php-simple-html-dom-parser": "~1.5.0", "sylius/resource-bundle": "1.2.*", - "friendsofsymfony/jsrouting-bundle": "~2.0", "gedmo/doctrine-extensions": "~2.4", "gregwar/captcha-bundle": "^2.0", @@ -160,6 +157,7 @@ "firebase/php-jwt": "^5.0" }, "require-dev": { + "symfony/var-dumper": "^4.0", "friendsofphp/php-cs-fixer": "^2.7", "symfony/browser-kit": "^4.0", "symfony/css-selector": "^4.0", diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index b71e2cd9cc..053b838333 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,4 +1,5 @@ framework: + form: ~ secret: '%env(APP_SECRET)%' default_locale: '%env(APP_LOCALE)%' translator: diff --git a/main/admin/access_urls.php b/main/admin/access_urls.php index 804a92013b..b30e7e2a9f 100755 --- a/main/admin/access_urls.php +++ b/main/admin/access_urls.php @@ -102,7 +102,8 @@ if ($current_access_url_id == -1) { ); if ($quant == 0) { echo Display::return_message( - ''.get_lang('ClickToRegisterAdmin').'', + ''. + get_lang('ClickToRegisterAdmin').'', 'warning', false ); @@ -139,23 +140,22 @@ echo Display::url( echo ''; -$sortable_data = UrlManager::get_url_data(); +$data = UrlManager::get_url_data(); $urls = []; -foreach ($sortable_data as $row) { - //title +foreach ($data as $row) { + // Title $url = Display::url($row['url'], $row['url'], ['target' => '_blank']); $description = $row['description']; + $createdAt = api_get_local_time($row['tms']); //Status $active = $row['active']; + $action = 'unlock'; + $image = 'wrong'; if ($active == '1') { $action = 'lock'; $image = 'right'; } - if ($active == '0') { - $action = 'unlock'; - $image = 'wrong'; - } // you cannot lock the default if ($row['id'] == '1') { $status = Display::return_icon($image.'.gif', get_lang(ucfirst($action))); @@ -165,12 +165,15 @@ foreach ($sortable_data as $row) { } // Actions $url_id = $row['id']; - $actions = Display::url(Display::return_icon('edit.png', get_lang('Edit'), [], ICON_SIZE_SMALL), "access_url_edit.php?url_id=$url_id"); + $actions = Display::url( + Display::return_icon('edit.png', get_lang('Edit'), [], ICON_SIZE_SMALL), + "access_url_edit.php?url_id=$url_id" + ); if ($url_id != '1') { $actions .= ''. Display::return_icon('delete.png', get_lang('Delete'), [], ICON_SIZE_SMALL).''; } - $urls[] = [$url, $description, $status, $actions]; + $urls[] = [$url, $description, $status, $createdAt, $actions]; } $table = new SortableTableFromArrayConfig($urls, 2, 50, 'urls'); @@ -178,7 +181,8 @@ $table->set_additional_parameters($parameters); $table->set_header(0, 'URL'); $table->set_header(1, get_lang('Description')); $table->set_header(2, get_lang('Active')); -$table->set_header(3, get_lang('Modify'), false); +$table->set_header(3, get_lang('CreatedAt')); +$table->set_header(4, get_lang('Modify'), false); $table->display(); Display :: display_footer(); diff --git a/main/admin/configure_homepage.php b/main/admin/configure_homepage.php index f952027f19..655eef1081 100755 --- a/main/admin/configure_homepage.php +++ b/main/admin/configure_homepage.php @@ -217,56 +217,6 @@ if (!empty($action)) { // for news file, $topf for top file, $noticef for noticefile, // $ext for '.html' switch ($action) { - case 'edit_top': - // Filter - $home_top = trim(stripslashes($_POST['home_top'])); - - // Write - if (is_writable($homep)) { - // Default - if (is_writable($homep.$topf.'_'.$lang.$ext)) { - $fp = fopen($homep.$topf.'_'.$lang.$ext, 'w'); - fputs($fp, $home_top); - fclose($fp); - - // Language - foreach ($_languages['name'] as $key => $value) { - $lang_name = $_languages['folder'][$key]; - if (isset($_POST[$lang_name])) { - $fp = fopen($homep.$topf.'_'.$lang_name.$ext, 'w'); - fputs($fp, $home_top); - fclose($fp); - } - } - } else { - $errorMsg = get_lang('HomePageFilesNotWritable'); - } - } else { - //File does not exist - $fp = fopen($homep.$topf.'_'.$lang.$ext, 'w'); - fputs($fp, $home_top); - fclose($fp); - - foreach ($_languages['name'] as $key => $value) { - $lang_name = $_languages['folder'][$key]; - if (isset($_POST[$lang_name])) { - if (file_exists($homep.$topf.'_'.$lang_name.$ext)) { - $fp = fopen($homep.$topf.'_'.$lang_name.$ext, 'w'); - fputs($fp, $home_top); - fclose($fp); - } - } - } - } - - Event::addEvent( - LOG_HOMEPAGE_CHANGED, - 'edit_top', - cut(strip_tags($home_top), 254), - api_get_utc_datetime(), - api_get_user_id() - ); - break; case 'edit_notice': // Filter $notice_title = trim(strip_tags(stripslashes($_POST['notice_title']))); @@ -1009,7 +959,6 @@ switch ($action) {