Remove unused settings_post and settings_form hooks
- Addons should use the addon_form hook instead
This commit is contained in:
parent
64330f9895
commit
90368d7484
3 changed files with 1 additions and 27 deletions
|
@ -232,14 +232,6 @@ Please note: body contents are bbcode - not HTML
|
||||||
Called when receiving a post from another source. This may also be used to post local activity or system generated messages.
|
Called when receiving a post from another source. This may also be used to post local activity or system generated messages.
|
||||||
`$b` is the item array of information to be stored in the database and the item body is bbcode.
|
`$b` is the item array of information to be stored in the database and the item body is bbcode.
|
||||||
|
|
||||||
### settings_form
|
|
||||||
Called when generating the HTML for the user Settings page.
|
|
||||||
`$b` is the HTML string of the settings page before the final `</form>` tag.
|
|
||||||
|
|
||||||
### settings_post
|
|
||||||
Called when the Settings pages are submitted.
|
|
||||||
`$b` is the $_POST array.
|
|
||||||
|
|
||||||
### addon_settings
|
### addon_settings
|
||||||
Called when generating the HTML for the addon settings page.
|
Called when generating the HTML for the addon settings page.
|
||||||
`$data` is an array containing:
|
`$data` is an array containing:
|
||||||
|
@ -750,11 +742,9 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
|
||||||
Hook::callAll('addon_settings_post', $_POST);
|
Hook::callAll('addon_settings_post', $_POST);
|
||||||
Hook::callAll('connector_settings_post', $_POST);
|
Hook::callAll('connector_settings_post', $_POST);
|
||||||
Hook::callAll('display_settings_post', $_POST);
|
Hook::callAll('display_settings_post', $_POST);
|
||||||
Hook::callAll('settings_post', $_POST);
|
|
||||||
Hook::callAll('addon_settings', $settings_addons);
|
Hook::callAll('addon_settings', $settings_addons);
|
||||||
Hook::callAll('connector_settings', $settings_connectors);
|
Hook::callAll('connector_settings', $settings_connectors);
|
||||||
Hook::callAll('display_settings', $o);
|
Hook::callAll('display_settings', $o);
|
||||||
Hook::callAll('settings_form', $o);
|
|
||||||
|
|
||||||
### mod/photos.php
|
### mod/photos.php
|
||||||
|
|
||||||
|
|
|
@ -106,12 +106,6 @@ Derzeitige Hooks
|
||||||
$b ist das Item-Array einer Information, die in der Datenbank und im Item gespeichert ist.
|
$b ist das Item-Array einer Information, die in der Datenbank und im Item gespeichert ist.
|
||||||
{Bitte beachte: der Seiteninhalt ist bbcode - nicht HTML)
|
{Bitte beachte: der Seiteninhalt ist bbcode - nicht HTML)
|
||||||
|
|
||||||
**'settings_form'** - wird aufgerufen, wenn die HTML-Ausgabe für die Einstellungsseite generiert wird.
|
|
||||||
$b ist die HTML-Ausgabe (String) der Einstellungsseite vor dem finalen "</form>"-Tag.
|
|
||||||
|
|
||||||
**'settings_post'** - wird aufgerufen, wenn die Einstellungsseiten geladen werden.
|
|
||||||
$b ist der $_POST-Array
|
|
||||||
|
|
||||||
**'addon_settings'** - wird aufgerufen, wenn die HTML-Ausgabe der Addon-Einstellungsseite generiert wird.
|
**'addon_settings'** - wird aufgerufen, wenn die HTML-Ausgabe der Addon-Einstellungsseite generiert wird.
|
||||||
$b ist die HTML-Ausgabe (String) der Addon-Einstellungsseite vor dem finalen "</form>"-Tag.
|
$b ist die HTML-Ausgabe (String) der Addon-Einstellungsseite vor dem finalen "</form>"-Tag.
|
||||||
|
|
||||||
|
@ -267,11 +261,9 @@ Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 01-Ap
|
||||||
Hook::callAll('addon_settings_post', $_POST);
|
Hook::callAll('addon_settings_post', $_POST);
|
||||||
Hook::callAll('connector_settings_post', $_POST);
|
Hook::callAll('connector_settings_post', $_POST);
|
||||||
Hook::callAll('display_settings_post', $_POST);
|
Hook::callAll('display_settings_post', $_POST);
|
||||||
Hook::callAll('settings_post', $_POST);
|
|
||||||
Hook::callAll('addon_settings', $settings_addons);
|
Hook::callAll('addon_settings', $settings_addons);
|
||||||
Hook::callAll('connector_settings', $settings_connectors);
|
Hook::callAll('connector_settings', $settings_connectors);
|
||||||
Hook::callAll('display_settings', $o);
|
Hook::callAll('display_settings', $o);
|
||||||
Hook::callAll('settings_form', $o);
|
|
||||||
|
|
||||||
### mod/photos.php
|
### mod/photos.php
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
namespace Friendica\Module\Settings;
|
namespace Friendica\Module\Settings;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Friendica\BaseModule;
|
|
||||||
use Friendica\Core\ACL;
|
use Friendica\Core\ACL;
|
||||||
use Friendica\Core\Hook;
|
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
|
@ -97,8 +95,6 @@ class Account extends BaseSettings
|
||||||
DI::baseUrl()->redirect('settings');
|
DI::baseUrl()->redirect('settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
Hook::callAll('settings_post', $_POST);
|
|
||||||
|
|
||||||
if (!empty($_POST['password']) || !empty($_POST['confirm'])) {
|
if (!empty($_POST['password']) || !empty($_POST['confirm'])) {
|
||||||
$newpass = $_POST['password'];
|
$newpass = $_POST['password'];
|
||||||
$confirm = $_POST['confirm'];
|
$confirm = $_POST['confirm'];
|
||||||
|
@ -485,7 +481,7 @@ class Account extends BaseSettings
|
||||||
'$submit' => DI::l10n()->t('Save Settings'),
|
'$submit' => DI::l10n()->t('Save Settings'),
|
||||||
'$baseurl' => DI::baseUrl()->get(true),
|
'$baseurl' => DI::baseUrl()->get(true),
|
||||||
'$uid' => local_user(),
|
'$uid' => local_user(),
|
||||||
'$form_security_token' => BaseModule::getFormSecurityToken("settings"),
|
'$form_security_token' => self::getFormSecurityToken('settings'),
|
||||||
'$nickname_block' => $prof_addr,
|
'$nickname_block' => $prof_addr,
|
||||||
|
|
||||||
'$h_pass' => DI::l10n()->t('Password Settings'),
|
'$h_pass' => DI::l10n()->t('Password Settings'),
|
||||||
|
@ -574,10 +570,6 @@ class Account extends BaseSettings
|
||||||
'$relocate_button' => DI::l10n()->t("Resend relocate message to contacts"),
|
'$relocate_button' => DI::l10n()->t("Resend relocate message to contacts"),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Hook::callAll('settings_form', $o);
|
|
||||||
|
|
||||||
$o .= '</form>' . "\r\n";
|
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue