File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -226,7 +226,19 @@ function _uploadFTP($params)
226226 if (!file_exists ($ path . '/conf.xml ' )) {
227227 $ apps [$ i ]['conf ' ] = $ apps [$ i ]['status ' ] = '' ;
228228 } else {
229- if (!file_exists ($ path . '/conf.php ' )) {
229+ // Check var/config/$app first
230+ $ foundConfig = false ;
231+ if (defined ('HORDE_CONFIG_BASE ' )) {
232+ $ configFilePath = HORDE_CONFIG_BASE . DIRECTORY_SEPARATOR . $ app . DIRECTORY_SEPARATOR . 'conf.php ' ;
233+ $ foundConfig = file_exists ($ configFilePath );
234+ }
235+ if (!$ foundConfig ) {
236+ $ configFilePath = $ path . '/conf.php ' ;
237+ $ foundConfig = file_exists ($ configFilePath );
238+ }
239+
240+
241+ if (!$ foundConfig ) {
230242 /* No conf.php exists. */
231243 $ apps [$ i ]['conf ' ] = $ conf_link . $ error . '</a> ' ;
232244 $ apps [$ i ]['status ' ] = $ conf_link . _ ("Missing configuration. " ) . '</a> ' ;
@@ -242,7 +254,7 @@ function _uploadFTP($params)
242254 $ xml_ver = $ hconfig ->getVersion ($ contentXml );
243255 }
244256 /* Get the generated php version. */
245- $ contentPhp = @file_get_contents ($ path . ' /conf.php ' );
257+ $ contentPhp = @file_get_contents ($ configFilePath );
246258 if (!$ contentPhp ) {
247259 $ apps [$ i ]['conf ' ] = $ conf_link . $ warning . '</a> ' ;
248260 $ apps [$ i ]['status ' ] = $ conf_link . _ ("Cannot read configuration file conf.php. " ) . '</a> ' ;
You can’t perform that action at this time.
0 commit comments