diff --git a/concrete/attributes/topics/type_form.php b/concrete/attributes/topics/type_form.php index d647c50c7bd..7fdcc1cf941 100644 --- a/concrete/attributes/topics/type_form.php +++ b/concrete/attributes/topics/type_form.php @@ -28,8 +28,6 @@ $('input[name="akTopicTreeID"]').val($(this).find(':selected').val()); $('.tree-view-template').remove(); $('.tree-view-container').append(treeViewTemplate); - var toolsURL = 'getToolsURL('tree/load'); - ?>'; var chosenTree = $(this).val(); $('.tree-view-template').concreteTree({ 'treeID': chosenTree, diff --git a/concrete/bootstrap/configure.php b/concrete/bootstrap/configure.php index 11be119281a..26bbf894dcb 100644 --- a/concrete/bootstrap/configure.php +++ b/concrete/bootstrap/configure.php @@ -120,7 +120,6 @@ const DIRNAME_THEMES = 'themes'; const DIRNAME_THEMES_CORE = 'core'; const DIRNAME_CONFIG = 'config'; -const DIRNAME_TOOLS = 'tools'; const DIRNAME_BLOCK_TEMPLATES = 'templates'; const DIRNAME_BLOCK_TEMPLATES_COMPOSER = 'composer'; const DIRNAME_CSS = 'css'; @@ -239,8 +238,6 @@ define('DIR_PACKAGES', DIR_BASE . '/packages'); define('DIR_FILES_BLOCK_TYPES', DIR_APPLICATION . '/' . DIRNAME_BLOCKS); define('DIR_FILES_BLOCK_TYPES_CORE', DIR_BASE_CORE . '/' . DIRNAME_BLOCKS); -define('DIR_FILES_TOOLS', DIR_APPLICATION . '/tools'); -define('DIR_FILES_TOOLS_REQUIRED', DIR_BASE_CORE . '/tools'); define('DIR_PACKAGES_CORE', DIR_BASE_CORE . '/packages'); defined('DIR_STARTING_POINT_PACKAGES') or define('DIR_STARTING_POINT_PACKAGES', DIR_CONFIG_SITE . '/install/packages'); define('DIR_STARTING_POINT_PACKAGES_CORE', DIR_BASE_CORE . '/config/install/packages'); diff --git a/concrete/bootstrap/paths.php b/concrete/bootstrap/paths.php index 516f27c3b80..1f9605c0e59 100644 --- a/concrete/bootstrap/paths.php +++ b/concrete/bootstrap/paths.php @@ -38,12 +38,3 @@ define('PACKAGE_GENERIC_ICON', ASSETS_URL_IMAGES . '/icons/icon_package_generic.png'); define('ASSETS_URL_THEMES_NO_THUMBNAIL', ASSETS_URL_IMAGES . '/spacer.gif'); define('AL_ICON_DEFAULT', ASSETS_URL_IMAGES . '/icons/filetypes/default.svg'); - -/* - * ---------------------------------------------------------------------------- - * Relative paths to tools. Passes through concrete5. - * ---------------------------------------------------------------------------- - */ -define('REL_DIR_FILES_TOOLS', $app['app_relative_path'] . '/' . DISPATCHER_FILENAME . '/tools'); -define('REL_DIR_FILES_TOOLS_REQUIRED', $app['app_relative_path'] . '/' . DISPATCHER_FILENAME . '/tools/required'); // front-end -define('REL_DIR_FILES_TOOLS_PACKAGES', REL_DIR_FILES_TOOLS . '/packages'); diff --git a/concrete/elements/header_required.php b/concrete/elements/header_required.php index c02a6074438..687784fdc11 100644 --- a/concrete/elements/header_required.php +++ b/concrete/elements/header_required.php @@ -183,7 +183,6 @@ var CCM_EDIT_MODE = ; var CCM_ARRANGE_MODE = ; var CCM_IMAGE_PATH = ""; - var CCM_TOOLS_PATH = ""; var CCM_APPLICATION_URL = "make('url/canonical'), '/'); ?>"; var CCM_REL = "make('app_relative_path'); ?>"; var CCM_ACTIVE_LOCALE = ; diff --git a/concrete/elements/preview_header_required.php b/concrete/elements/preview_header_required.php index 40d2b18a940..a43d1c2d237 100644 --- a/concrete/elements/preview_header_required.php +++ b/concrete/elements/preview_header_required.php @@ -29,7 +29,6 @@ var CCM_EDIT_MODE = false; var CCM_ARRANGE_MODE = false; var CCM_IMAGE_PATH = ""; - var CCM_TOOLS_PATH = ""; var CCM_APPLICATION_URL = ""; var CCM_REL = ""; var CCM_ACTIVE_LOCALE = ; diff --git a/concrete/single_pages/dashboard/pages/feeds.php b/concrete/single_pages/dashboard/pages/feeds.php index a459f656147..d189121a26a 100644 --- a/concrete/single_pages/dashboard/pages/feeds.php +++ b/concrete/single_pages/dashboard/pages/feeds.php @@ -219,8 +219,6 @@ class="btn btn-primary float-left"> var treeViewTemplate = $('.tree-view-template'); $('select[name=customTopicAttributeKeyHandle]').on('change', function () { - var toolsURL = 'getToolsURL('tree/load'); - ?>'; var chosenTree = $(this).find('option:selected').attr('data-topic-tree-id'); $('.tree-view-template').remove(); if (!chosenTree) { diff --git a/concrete/src/Application/Service/Urls.php b/concrete/src/Application/Service/Urls.php index 7e09774155c..54495159c63 100644 --- a/concrete/src/Application/Service/Urls.php +++ b/concrete/src/Application/Service/Urls.php @@ -46,30 +46,6 @@ public function getPackageURL($pkg) return $pkg->getRelativePath(); } - /** - * @deprecated - * Gets a URL to reference a script in the tools directory - * - * @param string $tool - * @param string $pkgHandle - * - * @return string Relative url to tool - */ - public function getToolsURL($tool, $pkgHandle = null) - { - if ($pkgHandle != null) { - $url = REL_DIR_FILES_TOOLS_PACKAGES . '/' . $pkgHandle . '/' . $tool; - - return $url; - } else { - if (file_exists(DIR_APPLICATION . '/' . DIRNAME_TOOLS . '/' . $tool . '.php')) { - return REL_DIR_FILES_TOOLS . '/' . $tool; - } else { - return REL_DIR_FILES_TOOLS_REQUIRED . '/' . $tool; - } - } - } - /** * Gets a full URL to an icon for a particular block type. * diff --git a/concrete/src/Foundation/Runtime/Run/DefaultRunner.php b/concrete/src/Foundation/Runtime/Run/DefaultRunner.php index 039bed559e0..398cf46399d 100644 --- a/concrete/src/Foundation/Runtime/Run/DefaultRunner.php +++ b/concrete/src/Foundation/Runtime/Run/DefaultRunner.php @@ -104,9 +104,6 @@ public function run() // Define legacy urls, this may be the first thing that loads the entity manager 'initializeLegacyUrlDefinitions', - // Register legacy tools routes - 'registerLegacyRoutes', - // Register legacy config values 'registerLegacyConfigValues', @@ -212,25 +209,6 @@ protected function registerLegacyConfigValues() $config->set('concrete.site', $name); } - /** - * Register routes that power legacy functionality - * This includes `/tools/tool_handle` and `/tools/blocks/block_handle/tool_handle`. - * - * @deprecated In a future major version this will be part of HTTP middleware - * - * @return Response|void Returns a response if an error occurs - */ - protected function registerLegacyRoutes() - { - $router = $this->getRouter(); - $router->register( - '/tools/{tool}', - '\Concrete\Core\Legacy\Controller\ToolController::display', - 'tool', - ['tool' => '[A-Za-z0-9_/.]+'] - ); - } - /** * Create the request object to use. */ diff --git a/concrete/src/Legacy/Controller/ToolController.php b/concrete/src/Legacy/Controller/ToolController.php deleted file mode 100644 index 549d8fc94cc..00000000000 --- a/concrete/src/Legacy/Controller/ToolController.php +++ /dev/null @@ -1,41 +0,0 @@ -isSamePath($path, $realpath)) { - $query = $tool; - } - } - - if ($query) { - $v = new DialogView($query); - $v->setViewRootDirectoryName(DIRNAME_TOOLS); - $this->setViewObject($v); - } else { - return $this->app->make(ResponseFactoryInterface::class)->notFound(''); - } - } -} diff --git a/concrete/src/System/Info.php b/concrete/src/System/Info.php index de8ce5a01b8..8884ee6a4be 100644 --- a/concrete/src/System/Info.php +++ b/concrete/src/System/Info.php @@ -271,7 +271,6 @@ public function getOverrideList() DIR_FILES_EMAIL_TEMPLATES, DIR_FILES_CONTENT, DIR_FILES_THEMES, - DIR_FILES_TOOLS, DIR_APPLICATION.'/'.DIRNAME_PAGE_TEMPLATES, DIR_APPLICATION.'/'.DIRNAME_VIEWS, DIR_APPLICATION.'/'.DIRNAME_CLASSES, diff --git a/concrete/src/Workflow/Workflow.php b/concrete/src/Workflow/Workflow.php index 4938ec44425..af60ff0fc9b 100644 --- a/concrete/src/Workflow/Workflow.php +++ b/concrete/src/Workflow/Workflow.php @@ -327,24 +327,6 @@ public static function getByName($wfName) return $wfID ? static::getByID($wfID) : null; } - /** - * Get the URL of a task for this workflow. - * - * @param string $task - * - * @return string - */ - public function getWorkflowToolsURL($task) - { - $type = $this->getWorkflowTypeObject(); - $app = Application::getFacadeApplication(); - $uh = $app->make('helper/concrete/urls'); - $url = $uh->getToolsURL('workflow/types/' . $type->getWorkflowTypeHandle(), $type->getPackageHandle()); - $url .= '?wfID=' . $this->getWorkflowID() . '&task=' . $task . '&' . $app->make('token')->getParameter($task); - - return $url; - } - /** * Change the (English) name of this workflow. * diff --git a/tests/tests/View/ViewTest.php b/tests/tests/View/ViewTest.php index e9244666c12..49cf3e44e61 100644 --- a/tests/tests/View/ViewTest.php +++ b/tests/tests/View/ViewTest.php @@ -61,7 +61,7 @@ public function testOAuthAuthorizeBasic() public function testLegacyToolsUrlDoesNotMatchDashboardTheme() { $view = new DialogView('/dashboard/get_image_data'); - $view->setViewRootDirectoryName(DIRNAME_TOOLS); + $view->setViewRootDirectoryName('tools'); $view->setupRender(); $template = $view->getViewTemplate(); $file = $view->getInnerContentFile();