Fix URL after moving 'main' dir to 'public'

pull/3064/head
Julio Montoya 6 years ago
parent d383666d7c
commit 73b45d2289
  1. 2
      composer.json
  2. 2
      config/packages/twig.yaml
  3. 2
      public/main/admin/settings.lib.php
  4. 1
      public/main/auth/courses_controller.php
  5. 143
      public/main/inc/lib/api.lib.php
  6. 2
      public/main/inc/lib/chamilo_session.class.php
  7. 5
      public/main/inc/lib/diagnoser.lib.php
  8. 2
      public/main/inc/lib/display.lib.php
  9. 2
      public/main/inc/lib/pdf.lib.php
  10. 4
      public/main/inc/lib/template.lib.php
  11. 2
      public/main/lp/learnpath.class.php
  12. 8
      src/CoreBundle/Menu/LeftMenuBuilder.php
  13. 4
      src/CoreBundle/Menu/NavBuilder.php

@ -28,7 +28,7 @@
"public/main/gradebook/lib", "public/main/gradebook/lib",
"public/main/lp", "public/main/lp",
"public/main/inc/lib", "public/main/inc/lib",
"plugin", "public/plugin",
"public/main/install", "public/main/install",
"public/main/survey" "public/main/survey"
] ]

@ -1,6 +1,6 @@
twig: twig:
debug: '%kernel.debug%' debug: '%kernel.debug%'
paths: ['%kernel.project_dir%/templates', '%kernel.project_dir%/public/main/template/', '%kernel.project_dir%/plugin/'] paths: ['%kernel.project_dir%/templates', '%kernel.project_dir%/public/main/template/', '%kernel.project_dir%/public/plugin/']
form_themes: form_themes:
- 'bootstrap_4_layout.html.twig' - 'bootstrap_4_layout.html.twig'
- '@SonataFormatter/Form/formatter.html.twig' - '@SonataFormatter/Form/formatter.html.twig'

@ -16,7 +16,7 @@ use Symfony\Component\Filesystem\Filesystem;
* *
* @package chamilo.admin * @package chamilo.admin
*/ */
define('CSS_UPLOAD_PATH', api_get_path(SYS_APP_PATH).'Resources/public/css/themes/'); define('CSS_UPLOAD_PATH', api_get_path(SYS_PATH).'Resources/public/css/themes/');
/** /**
* This function allows easy activating and inactivating of regions. * This function allows easy activating and inactivating of regions.

@ -30,7 +30,6 @@ class CoursesController
public function __construct() public function __construct()
{ {
$this->toolname = 'auth'; $this->toolname = 'auth';
//$actived_theme_path = api_get_template();
$this->view = new View($this->toolname); $this->view = new View($this->toolname);
$this->model = new Auth(); $this->model = new Auth();
} }

@ -314,13 +314,11 @@ define('REL_HOME_PATH', 'REL_HOME_PATH');
// Constants for api_get_path() and api_get_path_type(), etc. - registered path types. // Constants for api_get_path() and api_get_path_type(), etc. - registered path types.
define('WEB_PATH', 'WEB_PATH'); define('WEB_PATH', 'WEB_PATH');
define('SYS_PATH', 'SYS_PATH'); define('SYS_PATH', 'SYS_PATH');
define('SYS_APP_PATH', 'SYS_APP_PATH');
define('SYS_UPLOAD_PATH', 'SYS_UPLOAD_PATH'); define('SYS_UPLOAD_PATH', 'SYS_UPLOAD_PATH');
define('WEB_UPLOAD_PATH', 'WEB_UPLOAD_PATH'); define('WEB_UPLOAD_PATH', 'WEB_UPLOAD_PATH');
define('REL_PATH', 'REL_PATH'); define('REL_PATH', 'REL_PATH');
define('WEB_COURSE_PATH', 'WEB_COURSE_PATH'); define('WEB_COURSE_PATH', 'WEB_COURSE_PATH');
define('SYS_COURSE_PATH', 'SYS_COURSE_PATH');
define('WEB_CODE_PATH', 'WEB_CODE_PATH'); define('WEB_CODE_PATH', 'WEB_CODE_PATH');
define('SYS_CODE_PATH', 'SYS_CODE_PATH'); define('SYS_CODE_PATH', 'SYS_CODE_PATH');
define('SYS_LANG_PATH', 'SYS_LANG_PATH'); define('SYS_LANG_PATH', 'SYS_LANG_PATH');
@ -333,14 +331,12 @@ define('WEB_PLUGIN_PATH', 'WEB_PLUGIN_PATH');
define('WEB_PLUGIN_ASSET_PATH', 'WEB_PLUGIN_ASSET_PATH'); define('WEB_PLUGIN_ASSET_PATH', 'WEB_PLUGIN_ASSET_PATH');
define('SYS_ARCHIVE_PATH', 'SYS_ARCHIVE_PATH'); define('SYS_ARCHIVE_PATH', 'SYS_ARCHIVE_PATH');
define('WEB_ARCHIVE_PATH', 'WEB_ARCHIVE_PATH'); define('WEB_ARCHIVE_PATH', 'WEB_ARCHIVE_PATH');
define('SYS_INC_PATH', 'SYS_INC_PATH');
define('LIBRARY_PATH', 'LIBRARY_PATH'); define('LIBRARY_PATH', 'LIBRARY_PATH');
define('CONFIGURATION_PATH', 'CONFIGURATION_PATH'); define('CONFIGURATION_PATH', 'CONFIGURATION_PATH');
define('WEB_LIBRARY_PATH', 'WEB_LIBRARY_PATH'); define('WEB_LIBRARY_PATH', 'WEB_LIBRARY_PATH');
define('WEB_LIBRARY_JS_PATH', 'WEB_LIBRARY_JS_PATH'); define('WEB_LIBRARY_JS_PATH', 'WEB_LIBRARY_JS_PATH');
define('WEB_AJAX_PATH', 'WEB_AJAX_PATH'); define('WEB_AJAX_PATH', 'WEB_AJAX_PATH');
define('SYS_TEST_PATH', 'SYS_TEST_PATH'); define('SYS_TEST_PATH', 'SYS_TEST_PATH');
define('WEB_TEMPLATE_PATH', 'WEB_TEMPLATE_PATH');
define('SYS_TEMPLATE_PATH', 'SYS_TEMPLATE_PATH'); define('SYS_TEMPLATE_PATH', 'SYS_TEMPLATE_PATH');
define('SYS_PUBLIC_PATH', 'SYS_PUBLIC_PATH'); define('SYS_PUBLIC_PATH', 'SYS_PUBLIC_PATH');
define('SYS_FONTS_PATH', 'SYS_FONTS_PATH'); define('SYS_FONTS_PATH', 'SYS_FONTS_PATH');
@ -727,9 +723,7 @@ function api_get_path($path = '', $configuration = [])
$emptyConfigurationParam = true; $emptyConfigurationParam = true;
} }
$course_folder = 'courses/'; $root_sys = Container::getProjectDir();
$code_folder = 'public/main/';
$root_sys = Container::getRootDir();
$root_web = ''; $root_web = '';
// If no $root_web has been set so far *and* no custom config has been passed to the function // If no $root_web has been set so far *and* no custom config has been passed to the function
// then re-use the previously-calculated (run-specific) $root_web and skip this complex calculation // then re-use the previously-calculated (run-specific) $root_web and skip this complex calculation
@ -788,66 +782,49 @@ function api_get_path($path = '', $configuration = [])
} }
} }
$paths = []; $paths = [
// Initialise cache with default values. WEB_PATH => $root_web,
if (!array_key_exists($root_web, $paths)) { SYS_PATH => $root_sys.'public/',
$paths[$root_web] = [
WEB_PATH => '',
SYS_PATH => 'public/',
REL_PATH => '', REL_PATH => '',
WEB_COURSE_PATH => '', CONFIGURATION_PATH => 'app/config/',
SYS_COURSE_PATH => '', LIBRARY_PATH => 'inc/lib/',
REL_COURSE_PATH => '', REL_COURSE_PATH => '',
WEB_CODE_PATH => '/main/',
SYS_CODE_PATH => 'public/main/',
REL_CODE_PATH => '/main/', REL_CODE_PATH => '/main/',
SYS_LANG_PATH => 'lang/',
WEB_IMG_PATH => 'img/', SYS_CODE_PATH => $root_sys.'public/main/',
WEB_CSS_PATH => 'build/css/', SYS_CSS_PATH => $root_sys.'public/build/css/',
SYS_CSS_PATH => 'build/css/', SYS_PLUGIN_PATH => $root_sys.'public/plugin/',
SYS_PLUGIN_PATH => 'plugin/', SYS_ARCHIVE_PATH => $root_sys.'var/cache/',
WEB_PLUGIN_PATH => 'plugin/',
WEB_PLUGIN_ASSET_PATH => 'public/plugins/',
SYS_ARCHIVE_PATH => 'var/cache/',
WEB_ARCHIVE_PATH => 'var/cache/',
SYS_APP_PATH => 'var/',
SYS_UPLOAD_PATH => 'var/upload/', SYS_UPLOAD_PATH => 'var/upload/',
SYS_INC_PATH => 'inc/',
CONFIGURATION_PATH => 'app/config/',
LIBRARY_PATH => 'inc/lib/',
WEB_LIBRARY_PATH => 'inc/lib/',
WEB_LIBRARY_JS_PATH => 'inc/lib/javascript/',
WEB_AJAX_PATH => 'inc/ajax/',
SYS_TEST_PATH => 'tests/', SYS_TEST_PATH => 'tests/',
WEB_TEMPLATE_PATH => 'template/', SYS_TEMPLATE_PATH => $root_sys.'template/',
SYS_TEMPLATE_PATH => 'template/', SYS_PUBLIC_PATH => $root_sys.'public/',
SYS_FONTS_PATH => $root_sys.'public/fonts/',
WEB_CODE_PATH => $root_web.'main/',
WEB_PLUGIN_ASSET_PATH => $root_web.'plugins/',
WEB_COURSE_PATH => $root_web.'courses/',
WEB_IMG_PATH => $root_web.'img/',
WEB_CSS_PATH => $root_web.'build/css/',
WEB_AJAX_PATH => $root_web.'main/inc/ajax/',
WEB_LIBRARY_PATH => $root_web.'inc/lib/',
WEB_LIBRARY_JS_PATH => $root_web.'inc/lib/javascript/',
WEB_PLUGIN_PATH => $root_web.'plugin/',
WEB_ARCHIVE_PATH => 'var/cache/',
//WEB_UPLOAD_PATH => 'var/upload/', //WEB_UPLOAD_PATH => 'var/upload/',
WEB_PUBLIC_PATH => '/', WEB_PUBLIC_PATH => $root_web,
SYS_PUBLIC_PATH => 'public/',
SYS_FONTS_PATH => 'fonts/',
]; ];
}
$isInitialized = [];
$root_rel = ''; $root_rel = '';
if (!empty($root_rel)) {
// Adds "/" to the root_rel
$hasSlash = substr($root_rel, 0, 1);
if ($hasSlash !== '/') {
$root_rel = '/'.$root_rel;
}
}
// Web server base and system server base.
if (!array_key_exists($root_web, $isInitialized)) {
// Dealing with trailing slashes. // Dealing with trailing slashes.
$rootWebWithSlash = api_add_trailing_slash($root_web); $rootWebWithSlash = api_add_trailing_slash($root_web);
$root_sys = api_add_trailing_slash($root_sys); $root_sys = api_add_trailing_slash($root_sys);
$root_rel = api_add_trailing_slash($root_rel); $root_rel = api_add_trailing_slash($root_rel);
// Initialization of a table that contains common-purpose paths. // Initialization of a table that contains common-purpose paths.
$paths[$root_web][REL_PATH] = $root_rel; /*$paths[$root_web][REL_PATH] = $root_rel;
$paths[$root_web][REL_CODE_PATH] = $root_rel.$code_folder; $paths[$root_web][REL_CODE_PATH] = $root_rel.$code_folder;
$paths[$root_web][WEB_PATH] = $rootWebWithSlash; $paths[$root_web][WEB_PATH] = $rootWebWithSlash;
$paths[$root_web][WEB_CODE_PATH] = $rootWebWithSlash.'main/'; $paths[$root_web][WEB_CODE_PATH] = $rootWebWithSlash.'main/';
@ -863,7 +840,6 @@ function api_get_path($path = '', $configuration = [])
$paths[$root_web][WEB_LIBRARY_PATH] = $paths[$root_web][WEB_CODE_PATH].$paths[$root_web][WEB_LIBRARY_PATH]; $paths[$root_web][WEB_LIBRARY_PATH] = $paths[$root_web][WEB_CODE_PATH].$paths[$root_web][WEB_LIBRARY_PATH];
$paths[$root_web][WEB_LIBRARY_JS_PATH] = $paths[$root_web][WEB_CODE_PATH].$paths[$root_web][WEB_LIBRARY_JS_PATH]; $paths[$root_web][WEB_LIBRARY_JS_PATH] = $paths[$root_web][WEB_CODE_PATH].$paths[$root_web][WEB_LIBRARY_JS_PATH];
$paths[$root_web][WEB_AJAX_PATH] = $paths[$root_web][WEB_CODE_PATH].$paths[$root_web][WEB_AJAX_PATH]; $paths[$root_web][WEB_AJAX_PATH] = $paths[$root_web][WEB_CODE_PATH].$paths[$root_web][WEB_AJAX_PATH];
$paths[$root_web][WEB_TEMPLATE_PATH] = $paths[$root_web][WEB_CODE_PATH].$paths[$root_web][WEB_TEMPLATE_PATH];
$paths[$root_web][SYS_PATH] = $root_sys; $paths[$root_web][SYS_PATH] = $root_sys;
$paths[$root_web][SYS_CODE_PATH] = $root_sys.$code_folder; $paths[$root_web][SYS_CODE_PATH] = $root_sys.$code_folder;
@ -875,20 +851,16 @@ function api_get_path($path = '', $configuration = [])
$paths[$root_web][SYS_ARCHIVE_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][SYS_ARCHIVE_PATH]; $paths[$root_web][SYS_ARCHIVE_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][SYS_ARCHIVE_PATH];
$paths[$root_web][SYS_APP_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][SYS_APP_PATH]; $paths[$root_web][SYS_APP_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][SYS_APP_PATH];
$paths[$root_web][SYS_UPLOAD_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][SYS_UPLOAD_PATH]; $paths[$root_web][SYS_UPLOAD_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][SYS_UPLOAD_PATH];
$paths[$root_web][SYS_LANG_PATH] = $paths[$root_web][SYS_CODE_PATH].$paths[$root_web][SYS_LANG_PATH];
$paths[$root_web][SYS_PLUGIN_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][SYS_PLUGIN_PATH]; $paths[$root_web][SYS_PLUGIN_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][SYS_PLUGIN_PATH];
$paths[$root_web][SYS_INC_PATH] = $paths[$root_web][SYS_CODE_PATH].$paths[$root_web][SYS_INC_PATH];
$paths[$root_web][LIBRARY_PATH] = $paths[$root_web][SYS_CODE_PATH].$paths[$root_web][LIBRARY_PATH]; $paths[$root_web][LIBRARY_PATH] = $paths[$root_web][SYS_CODE_PATH].$paths[$root_web][LIBRARY_PATH];
$paths[$root_web][CONFIGURATION_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][CONFIGURATION_PATH]; $paths[$root_web][CONFIGURATION_PATH] = $paths[$root_web][SYS_PATH].$paths[$root_web][CONFIGURATION_PATH];*/
global $virtualChamilo; global $virtualChamilo;
if (!empty($virtualChamilo)) { if (!empty($virtualChamilo)) {
$paths[$root_web][SYS_ARCHIVE_PATH] = api_add_trailing_slash($virtualChamilo[SYS_ARCHIVE_PATH]); $paths[SYS_ARCHIVE_PATH] = api_add_trailing_slash($virtualChamilo[SYS_ARCHIVE_PATH]);
$paths[$root_web][SYS_COURSE_PATH] = api_add_trailing_slash($virtualChamilo[SYS_COURSE_PATH]); $paths[SYS_UPLOAD_PATH] = api_add_trailing_slash($virtualChamilo[SYS_UPLOAD_PATH]);
$paths[$root_web][SYS_UPLOAD_PATH] = api_add_trailing_slash($virtualChamilo[SYS_UPLOAD_PATH]);
//$paths[$root_web][WEB_UPLOAD_PATH] = api_add_trailing_slash($virtualChamilo[WEB_UPLOAD_PATH]); //$paths[$root_web][WEB_UPLOAD_PATH] = api_add_trailing_slash($virtualChamilo[WEB_UPLOAD_PATH]);
$paths[$root_web][WEB_ARCHIVE_PATH] = api_add_trailing_slash($virtualChamilo[WEB_ARCHIVE_PATH]); $paths[WEB_ARCHIVE_PATH] = api_add_trailing_slash($virtualChamilo[WEB_ARCHIVE_PATH]);
//$paths[$root_web][WEB_COURSE_PATH] = api_add_trailing_slash($virtualChamilo[WEB_COURSE_PATH]); //$paths[$root_web][WEB_COURSE_PATH] = api_add_trailing_slash($virtualChamilo[WEB_COURSE_PATH]);
// WEB_UPLOAD_PATH should be handle by apache htaccess in the vhost // WEB_UPLOAD_PATH should be handle by apache htaccess in the vhost
@ -901,30 +873,14 @@ function api_get_path($path = '', $configuration = [])
//$paths[$root_web][REL_COURSE_PATH] = $virtualChamilo[REL_COURSE_PATH]; //$paths[$root_web][REL_COURSE_PATH] = $virtualChamilo[REL_COURSE_PATH];
} }
$isInitialized[$root_web] = true;
}
$path = trim($path); $path = trim($path);
// Retrieving a common-purpose path. // Retrieving a common-purpose path.
if (isset($paths[$root_web][$path])) { if (isset($paths[$path])) {
return $paths[$root_web][$path]; return $paths[$path];
}
// Second purification.
// Replacing Windows back slashes.
$path = str_replace('\\', '/', $path);
// Query strings sometimes mighth wrongly appear in non-URLs.
// Let us check remove them from all types of paths.
if (($pos = strpos($path, '?')) !== false) {
$path = substr($path, 0, $pos);
} }
// Path now is semi-absolute. It is convenient at this moment repeated slashes to be removed. return false;
$path = preg_replace(REPEATED_SLASHES_PURIFIER, '/', $path);
return $path;
} }
/** /**
@ -2198,7 +2154,6 @@ function api_format_course_array(Course $course)
$courseData['legal'] = $course->getLegal(); $courseData['legal'] = $course->getLegal();
$courseData['show_score'] = $course->getShowScore(); //used in the work tool $courseData['show_score'] = $course->getShowScore(); //used in the work tool
//$courseSys = api_get_path(SYS_COURSE_PATH).$course_data['directory'];
$webCourseHome = api_get_path(WEB_COURSE_PATH).$courseData['code']; $webCourseHome = api_get_path(WEB_COURSE_PATH).$courseData['code'];
// Course password // Course password
@ -6864,34 +6819,6 @@ function api_protect_global_admin_script()
return true; return true;
} }
/**
* Get active template.
*
* @param string theme type (optional: default)
* @param string path absolute(abs) or relative(rel) (optional:rel)
*
* @return string actived template path
*/
function api_get_template($path_type = 'rel')
{
$path_types = ['rel', 'abs'];
$template_path = '';
if (in_array($path_type, $path_types)) {
if ($path_type == 'rel') {
$template_path = api_get_path(SYS_TEMPLATE_PATH);
} else {
$template_path = api_get_path(WEB_TEMPLATE_PATH);
}
}
$actived_theme = 'default';
if (api_get_setting('active_template')) {
$actived_theme = api_get_setting('active_template');
}
$actived_theme_path = $template_path.$actived_theme.DIRECTORY_SEPARATOR;
return $actived_theme_path;
}
/** /**
* Check browser support for specific file types or features * Check browser support for specific file types or features
* This function checks if the user's browser supports a file format or given * This function checks if the user's browser supports a file format or given

@ -59,7 +59,7 @@ class ChamiloSession implements \ArrayAccess
$session = Container::getSession(); $session = Container::getSession();
$result = null; $result = null;
if (isset($session)) { if (isset($session) && $session) {
$result = $session->get($variable); $result = $session->get($variable);
} }

@ -145,9 +145,8 @@ class Diagnoser
{ {
$array = []; $array = [];
$writable_folders = [ $writable_folders = [
api_get_path(SYS_APP_PATH).'cache', api_get_path(SYS_ARCHIVE_PATH).'cache',
api_get_path(SYS_COURSE_PATH), api_get_path(SYS_PATH).'upload/users/',
api_get_path(SYS_APP_PATH).'upload/users/',
]; ];
foreach ($writable_folders as $index => $folder) { foreach ($writable_folders as $index => $folder) {
$writable = is_writable($folder); $writable = is_writable($folder);

@ -770,7 +770,7 @@ class Display
$image = trim($image); $image = trim($image);
if (isset($size)) { if (isset($size)) {
$size = intval($size); $size = (int) $size;
} else { } else {
$size = ICON_SIZE_SMALL; $size = ICON_SIZE_SMALL;
} }

@ -387,7 +387,7 @@ class PDF
$addDefaultCss = false, $addDefaultCss = false,
$completeHeader = true $completeHeader = true
) { ) {
$urlAppend = api_get_configuration_value('url_append'); $urlAppend = '';
if (empty($document_html)) { if (empty($document_html)) {
return false; return false;

@ -1557,7 +1557,7 @@ class Template
} }
if (api_is_multiple_url_enabled()) { if (api_is_multiple_url_enabled()) {
$access_url_id = api_get_current_access_url_id(); /*$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1) { if ($access_url_id != -1) {
$url_info = api_get_access_url($access_url_id); $url_info = api_get_access_url($access_url_id);
$url = api_remove_trailing_slash( $url = api_remove_trailing_slash(
@ -1572,7 +1572,7 @@ class Template
if (is_file($icon_real_homep.'favicon.ico')) { if (is_file($icon_real_homep.'favicon.ico')) {
$favico = '<link rel="shortcut icon" href="'.$homep.'favicon.ico" type="image/x-icon" />'; $favico = '<link rel="shortcut icon" href="'.$homep.'favicon.ico" type="image/x-icon" />';
} }
} }*/
} }
$this->assign('favico', $favico); $this->assign('favico', $favico);

@ -6826,7 +6826,7 @@ class learnpath
public function edit_document($_course) public function edit_document($_course)
{ {
$course_id = api_get_course_int_id(); $course_id = api_get_course_int_id();
$urlAppend = api_get_configuration_value('url_append'); $urlAppend = '';
// Please, do not modify this dirname formatting. // Please, do not modify this dirname formatting.
$postDir = isset($_POST['dir']) ? $_POST['dir'] : ''; $postDir = isset($_POST['dir']) ? $_POST['dir'] : '';
$dir = isset($_GET['dir']) ? $_GET['dir'] : $postDir; $dir = isset($_GET['dir']) ? $_GET['dir'] : $postDir;

@ -179,7 +179,7 @@ class LeftMenuBuilder implements ContainerAwareInterface
] ]
); );
$menu->addChild( /*$menu->addChild(
$translator->trans('My files'), $translator->trans('My files'),
[ [
'route' => 'legacy_main', 'route' => 'legacy_main',
@ -187,7 +187,7 @@ class LeftMenuBuilder implements ContainerAwareInterface
'name' => 'social/myfiles.php', 'name' => 'social/myfiles.php',
], ],
] ]
); );*/
$menu->addChild( $menu->addChild(
$translator->trans('Edit profile'), $translator->trans('Edit profile'),
@ -304,7 +304,7 @@ class LeftMenuBuilder implements ContainerAwareInterface
] ]
); );
$menu->addChild( /*$menu->addChild(
$translator->trans('My files'), $translator->trans('My files'),
[ [
'route' => 'legacy_main', 'route' => 'legacy_main',
@ -312,7 +312,7 @@ class LeftMenuBuilder implements ContainerAwareInterface
'name' => 'social/myfiles.php', 'name' => 'social/myfiles.php',
], ],
] ]
); );*/
} }
return $menu; return $menu;

@ -209,13 +209,13 @@ class NavBuilder implements ContainerAwareInterface
'routeParameters' => ['name' => 'social/groups.php'], 'routeParameters' => ['name' => 'social/groups.php'],
] ]
); );
$menu['social']->addChild( /*$menu['social']->addChild(
$translator->trans('My Files'), $translator->trans('My Files'),
[ [
'route' => 'legacy_main', 'route' => 'legacy_main',
'routeParameters' => ['name' => 'social/myfiles.php'], 'routeParameters' => ['name' => 'social/myfiles.php'],
] ]
); );*/
} }
if ($checker->isGranted('ROLE_ADMIN')) { if ($checker->isGranted('ROLE_ADMIN')) {

Loading…
Cancel
Save