Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for custom Templates in Global Search #10536

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/Search/UI/SearchFormView.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2021 SalesAgility Ltd.
* Copyright (C) 2011 - 2024 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
Expand Down Expand Up @@ -56,7 +56,13 @@ class SearchFormView extends View
{
public function __construct()
{
parent::__construct(__DIR__ . '/templates/search.form.tpl');
$templateFile = get_custom_file_if_exists('templates/search.form.tpl');

if (str_begin($templateFile, 'custom/')) {
parent::__construct($templateFile);
} else {
parent::__construct(__DIR__ . '/templates/search.form.tpl');
}
}

/** @inheritdoc */
Expand Down