From 97ce92c8ab3c3b0bf2d8484920dff1400dff011c Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 14 Aug 2018 18:12:01 -0700 Subject: [PATCH] Use "Custom Fields" for the tab in "Pages". Fix for type=file returning a bad URL. --- e107_handlers/e_customfields_class.php | 4 ++++ e107_themes/bootstrap3/install/install.xml | 2 +- e107_themes/bootstrap3/templates/page_template.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/e107_handlers/e_customfields_class.php b/e107_handlers/e_customfields_class.php index dbe3f3551..dd76b92fb 100644 --- a/e107_handlers/e_customfields_class.php +++ b/e107_handlers/e_customfields_class.php @@ -189,6 +189,10 @@ break; case "file": + if(empty($value)) + { + return null; + } return ($raw) ? $tp->toFile($value, array('raw'=>1)) : $tp->toFile($value); break; diff --git a/e107_themes/bootstrap3/install/install.xml b/e107_themes/bootstrap3/install/install.xml index 9f26e96cc..42dad46a5 100644 --- a/e107_themes/bootstrap3/install/install.xml +++ b/e107_themes/bootstrap3/install/install.xml @@ -374,7 +374,7 @@ Morbi porta leo iaculis, hendrerit lorem interdum, porta dui. Integer tempor con 0 { "__tabs__": { - "additional": "Additional" + "additional": "Custom Fields" }, "mybbarea": { "title": "Rich Text", diff --git a/e107_themes/bootstrap3/templates/page_template.php b/e107_themes/bootstrap3/templates/page_template.php index 5b0062378..8754dbda4 100644 --- a/e107_themes/bootstrap3/templates/page_template.php +++ b/e107_themes/bootstrap3/templates/page_template.php @@ -154,7 +154,7 @@ $sc_style['CPAGENAV|default']['post'] = ''; $PAGE_TEMPLATE['customfields']['body'] = ' -
+
Custom Fields