Skip to content

Commit

Permalink
Fix #10536 - Check for custom Templates in Global Search
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiisamko091184 committed Oct 3, 2024
1 parent 1a114a9 commit 336ad48
Showing 1 changed file with 8 additions and 2 deletions.
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

0 comments on commit 336ad48

Please sign in to comment.