]> git.mxchange.org Git - friendica.git/commitdiff
Delete mod/settings.php and its reference
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 5 Nov 2022 03:59:55 +0000 (23:59 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 9 Nov 2022 11:26:08 +0000 (06:26 -0500)
mod/settings.php [deleted file]
src/Module/Security/OpenID.php

diff --git a/mod/settings.php b/mod/settings.php
deleted file mode 100644 (file)
index 619f40b..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
- *
- * @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/>.
- *
- */
-
-use Friendica\App;
-use Friendica\BaseModule;
-use Friendica\Content\Feature;
-use Friendica\Content\Nav;
-use Friendica\Core\Hook;
-use Friendica\Core\Logger;
-use Friendica\Core\Renderer;
-use Friendica\Database\DBA;
-use Friendica\DI;
-use Friendica\Model\Item;
-use Friendica\Model\User;
-use Friendica\Module\BaseSettings;
-use Friendica\Module\Security\Login;
-use Friendica\Protocol\Email;
-
-function settings_init(App $a)
-{
-       if (!DI::userSession()->getLocalUserId()) {
-               DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
-               return;
-       }
-
-       BaseSettings::createAside();
-}
-
-function settings_post(App $a)
-{
-       if (!$a->isLoggedIn()) {
-               DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
-               return;
-       }
-
-       if (DI::userSession()->getSubManagedUserId()) {
-               return;
-       }
-
-       if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'features')) {
-               BaseModule::checkFormSecurityTokenRedirectOnError('/settings/features', 'settings_features');
-               foreach ($_POST as $k => $v) {
-                       if (strpos($k, 'feature_') === 0) {
-                               DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'feature', substr($k, 8), ((intval($v)) ? 1 : 0));
-                       }
-               }
-               return;
-       }
-}
-
-function settings_content(App $a)
-{
-       $o = '';
-       Nav::setSelected('settings');
-
-       if (!DI::userSession()->getLocalUserId()) {
-               //DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
-               return Login::form();
-       }
-
-       if (DI::userSession()->getSubManagedUserId()) {
-               DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
-               return '';
-       }
-
-       if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'features')) {
-
-               $arr = [];
-               $features = Feature::get();
-               foreach ($features as $fname => $fdata) {
-                       $arr[$fname] = [];
-                       $arr[$fname][0] = $fdata[0];
-                       foreach (array_slice($fdata,1) as $f) {
-                               $arr[$fname][1][] = ['feature_' . $f[0], $f[1], Feature::isEnabled(DI::userSession()->getLocalUserId(), $f[0]), $f[2]];
-                       }
-               }
-
-               $tpl = Renderer::getMarkupTemplate('settings/features.tpl');
-               $o .= Renderer::replaceMacros($tpl, [
-                       '$form_security_token' => BaseModule::getFormSecurityToken("settings_features"),
-                       '$title'               => DI::l10n()->t('Additional Features'),
-                       '$features'            => $arr,
-                       '$submit'              => DI::l10n()->t('Save Settings'),
-               ]);
-               return $o;
-       }
-}
index 2675f1fec335af80af3fa9c6911f855c845f5753..e33fb42b7a60799075b20c888f5b596ab891b9f7 100644 (file)
@@ -56,9 +56,9 @@ class OpenID extends BaseModule
                                }
 
                                // NOTE: we search both for normalised and non-normalised form of $authid
-                               //       because the normalization step was removed from setting
-                               //       mod/settings.php in 8367cad so it might have left mixed
-                               //       records in the user table
+                               //       because the normalization step was removed from settings
+                               //       in commit 8367cadeeffec4b6792a502847304b17ceba5882, so it might
+                               //       have left mixed records in the user table
                                //
                                $condition = ['blocked' => false, 'account_expired' => false, 'account_removed' => false, 'verified' => true,
                                              'openid' => [$authId, Strings::normaliseOpenID($authId)]];