]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Admin/Site.php
Merge pull request #8272 from MrPetovan/bug/8254-regex-url-img
[friendica.git] / src / Module / Admin / Site.php
index 50a9c9d22e1bb41bec17e48835814a49762c7925..ec6f01afa0689d78dab38d02a97311d5afebc41e 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Module\Admin;
 
@@ -556,6 +575,13 @@ class Site extends BaseAdmin
                if (!is_null($current_storage_backend) && $current_storage_backend != '') {
                        foreach ($current_storage_backend->getOptions() as $name => $info) {
                                $type = $info[0];
+                               // Backward compatibilty with yesno field description
+                               if ($type == 'yesno') {
+                                       $type = 'checkbox';
+                                       // Remove translated labels Yes No from field info
+                                       unset($info[4]);
+                               }
+
                                $info[0] = $storage_form_prefix . '_' . $name;
                                $info['type'] = $type;
                                $info['field'] = 'field_' . $type . '.tpl';