Custom/ directory, what adds files here?

Hi,

I get warnings during upgrades that i have files in the custom/ directories that won’t get upgraded. What puzzles me is that i have no memory that i would have added there any files. Most of the differences are whitespace diffs, but there are also differences in functions like below…

--- custom/include/SugarFields/Fields/Address/SugarFieldAddress.php	2016-11-15 01:33:14.000000000 +0200
+++ include/SugarFields/Fields/Address/SugarFieldAddress.php	2020-04-12 17:37:40.846693121 +0300
@@ -1,11 +1,14 @@
 <?php
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
-/*********************************************************************************
+if (!defined('sugarEntry') || !sugarEntry) {
+    die('Not A Valid Entry Point');
+}
+/**
+ *
  * SugarCRM Community Edition is a customer relationship management program developed by
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
-
- * SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd.
- * Copyright (C) 2011 - 2014 Salesagility Ltd.
+ *
+ * SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
+ * Copyright (C) 2011 - 2018 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
@@ -36,7 +39,7 @@
  * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
  * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
  * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
- ********************************************************************************/
+ */
 
 
 
@@ -66,9 +69,10 @@
  * 
  */
 require_once('include/SugarFields/Fields/Base/SugarFieldBase.php');
-class SugarFieldAddress extends SugarFieldBase {
-
-    function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) {
+class SugarFieldAddress extends SugarFieldBase
+{
+    public function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex)
+    {
         $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex);
         global $app_strings;
         if(!isset($displayParams['key'])) {
@@ -86,7 +90,8 @@
         return $this->fetch($this->findTemplate('DetailView'));
     }
     
-    function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) {
+    public function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex)
+    {
         $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex);        
         global $app_strings;
         if(!isset($displayParams['key'])) {
@@ -103,6 +108,4 @@
 
         return $this->fetch($this->findTemplate('EditView'));      
     }
-    
 }
-?>

Any general hint what should i do with these files?

@hertell
You should select your way. :slight_smile:

  1. use only new system functions and remove your custom functions (file),
  2. use your custom functions (file) and ignore new new system functions,
  3. merge custom functions and new system functions.
    May be something else. :wink:
1 Like

What puzzles me is that i have not added any files to the custom-directories…

I wonder if it’s the Studio that would do this?

@hertell
Studio can’t change this files.

Really strange… I wonder what has added them there…

Time to clean that up and see what happens :smiley:

1 Like