mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 13:43:23 +00:00
Merge pull request #784 from MrPetovan/task/4176-scrutinizer
Replace deprecated method/function calls
This commit is contained in:
commit
36120615dd
82 changed files with 648 additions and 651 deletions
|
@ -36,8 +36,8 @@
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\BaseModule;
|
use Friendica\BaseModule;
|
||||||
use Friendica\Content\Text\Markdown;
|
use Friendica\Content\Text\Markdown;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -60,9 +60,9 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'a
|
||||||
|
|
||||||
function advancedcontentfilter_install()
|
function advancedcontentfilter_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
|
Hook::register('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
|
||||||
Addon::registerHook('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
|
Hook::register('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
|
||||||
Addon::registerHook('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
|
Hook::register('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
|
||||||
|
|
||||||
DBStructure::update(false, true);
|
DBStructure::update(false, true);
|
||||||
|
|
||||||
|
@ -71,9 +71,9 @@ function advancedcontentfilter_install()
|
||||||
|
|
||||||
function advancedcontentfilter_uninstall()
|
function advancedcontentfilter_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
|
Hook::unregister('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
|
||||||
Addon::unregisterHook('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
|
Hook::unregister('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
|
||||||
Addon::unregisterHook('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
|
Hook::unregister('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -50,17 +50,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
|
||||||
function blackout_install() {
|
function blackout_install() {
|
||||||
Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
|
Hook::register('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
|
||||||
}
|
}
|
||||||
|
|
||||||
function blackout_uninstall() {
|
function blackout_uninstall() {
|
||||||
Addon::unregisterHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
|
Hook::unregister('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
|
||||||
}
|
}
|
||||||
function blackout_redirect ($a, $b) {
|
function blackout_redirect ($a, $b) {
|
||||||
// if we have a logged in user, don't throw her out
|
// if we have a logged in user, don't throw her out
|
||||||
|
|
|
@ -8,32 +8,32 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
function blockem_install()
|
function blockem_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
|
Hook::register('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
|
||||||
Addon::registerHook('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
|
Hook::register('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
|
||||||
Addon::registerHook('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
Hook::register('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
Hook::register('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
||||||
Addon::registerHook('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
|
Hook::register('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
|
||||||
Addon::registerHook('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
Hook::register('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
||||||
Addon::registerHook('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
|
Hook::register('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockem_uninstall()
|
function blockem_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
|
Hook::unregister('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
|
||||||
Addon::unregisterHook('prepare_body' , 'addon/blockem/blockem.php', 'blockem_prepare_body');
|
Hook::unregister('prepare_body' , 'addon/blockem/blockem.php', 'blockem_prepare_body');
|
||||||
Addon::unregisterHook('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
|
Hook::unregister('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
|
||||||
Addon::unregisterHook('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
Hook::unregister('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
Hook::unregister('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
|
||||||
Addon::unregisterHook('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
|
Hook::unregister('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
|
||||||
Addon::unregisterHook('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
Hook::unregister('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
|
||||||
Addon::unregisterHook('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
|
Hook::unregister('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockem_addon_settings (App $a, &$s)
|
function blockem_addon_settings (App $a, &$s)
|
||||||
|
@ -243,5 +243,5 @@ function blockem_init(App $a)
|
||||||
|
|
||||||
PConfig::set(local_user(), 'blockem', 'words', $words);
|
PConfig::set(local_user(), 'blockem', 'words', $words);
|
||||||
info(L10n::t('blockem settings updated') . EOL);
|
info(L10n::t('blockem settings updated') . EOL);
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -17,27 +17,27 @@ use Friendica\Util\XML;
|
||||||
|
|
||||||
function blogger_install()
|
function blogger_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
|
Hook::register('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
|
||||||
Addon::registerHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
|
Hook::register('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
|
Hook::register('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
|
Hook::register('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
|
Hook::register('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
Hook::register('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function blogger_uninstall()
|
function blogger_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
|
Hook::unregister('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
|
||||||
Addon::unregisterHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
|
Hook::unregister('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
|
Hook::unregister('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
|
Hook::unregister('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
|
Hook::unregister('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
||||||
|
|
||||||
// obsolete - remove
|
// obsolete - remove
|
||||||
Addon::unregisterHook('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
|
Hook::unregister('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/blogger/blogger.php', 'blogger_settings');
|
Hook::unregister('addon_settings', 'addon/blogger/blogger.php', 'blogger_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
require 'addon/buffer/bufferapp.php';
|
require 'addon/buffer/bufferapp.php';
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\Plaintext;
|
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -23,22 +22,22 @@ use Friendica\Util\Strings;
|
||||||
|
|
||||||
function buffer_install()
|
function buffer_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
|
Hook::register('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
|
||||||
Addon::registerHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
|
Hook::register('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
|
Hook::register('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
|
Hook::register('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
|
Hook::register('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
|
Hook::register('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_uninstall()
|
function buffer_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
|
Hook::unregister('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
|
||||||
Addon::unregisterHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
|
Hook::unregister('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
|
Hook::unregister('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
|
Hook::unregister('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
|
Hook::unregister('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function buffer_module()
|
function buffer_module()
|
||||||
|
|
|
@ -7,17 +7,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
|
||||||
function buglink_install()
|
function buglink_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
|
Hook::register('page_end', 'addon/buglink/buglink.php', 'buglink_active');
|
||||||
}
|
}
|
||||||
|
|
||||||
function buglink_uninstall()
|
function buglink_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
|
Hook::unregister('page_end', 'addon/buglink/buglink.php', 'buglink_active');
|
||||||
}
|
}
|
||||||
|
|
||||||
function buglink_active(App $a, &$b)
|
function buglink_active(App $a, &$b)
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function calc_install() {
|
function calc_install() {
|
||||||
Addon::registerHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
|
Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function calc_uninstall() {
|
function calc_uninstall() {
|
||||||
Addon::unregisterHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
|
Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -26,9 +26,9 @@ define("CATAVATAR_SIZE", 256);
|
||||||
*/
|
*/
|
||||||
function catavatar_install()
|
function catavatar_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
|
Hook::register('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
|
||||||
Addon::registerHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
|
Hook::register('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
|
||||||
|
|
||||||
Logger::log('registered catavatar');
|
Logger::log('registered catavatar');
|
||||||
}
|
}
|
||||||
|
@ -38,9 +38,9 @@ function catavatar_install()
|
||||||
*/
|
*/
|
||||||
function catavatar_uninstall()
|
function catavatar_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
|
Hook::unregister('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
|
Hook::unregister('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
|
||||||
|
|
||||||
Logger::log('unregistered catavatar');
|
Logger::log('unregistered catavatar');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function convert_install() {
|
function convert_install() {
|
||||||
Addon::registerHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
|
Hook::register('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function convert_uninstall() {
|
function convert_uninstall() {
|
||||||
Addon::unregisterHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
|
Hook::unregister('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function convert_app_menu($a,&$b) {
|
function convert_app_menu($a,&$b) {
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
require_once 'include/text.php';
|
require_once 'include/text.php';
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -23,16 +23,16 @@ use Friendica\Util\Proxy as ProxyUtils;
|
||||||
|
|
||||||
function curweather_install()
|
function curweather_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
|
Hook::register('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
|
||||||
Addon::registerHook('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
|
Hook::register('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function curweather_uninstall()
|
function curweather_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
|
Hook::unregister('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
|
||||||
Addon::unregisterHook('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
|
Hook::unregister('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the weather data from OpenWeatherMap
|
// get the weather data from OpenWeatherMap
|
||||||
|
|
|
@ -11,7 +11,7 @@ require_once 'addon/diaspora/Diaspora_Connection.php';
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -21,24 +21,24 @@ use Friendica\Model\Queue;
|
||||||
|
|
||||||
function diaspora_install()
|
function diaspora_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
|
Hook::register('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
|
||||||
Addon::registerHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
|
Hook::register('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
|
Hook::register('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
|
Hook::register('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
|
Hook::register('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
|
Hook::register('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
|
||||||
Addon::registerHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
|
Hook::register('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
function diaspora_uninstall()
|
function diaspora_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
|
Hook::unregister('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
|
||||||
Addon::unregisterHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
|
Hook::unregister('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
|
Hook::unregister('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
|
Hook::unregister('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
|
Hook::unregister('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
|
||||||
Addon::unregisterHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
|
Hook::unregister('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
function diaspora_jot_nets(App $a, &$b)
|
function diaspora_jot_nets(App $a, &$b)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -21,20 +21,20 @@ use Friendica\Util\XML;
|
||||||
|
|
||||||
function dwpost_install()
|
function dwpost_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
|
Hook::register('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
|
Hook::register('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
|
Hook::register('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
|
Hook::register('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
|
Hook::register('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function dwpost_uninstall()
|
function dwpost_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
|
Hook::unregister('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
|
Hook::unregister('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
|
Hook::unregister('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
|
Hook::unregister('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function dwpost_jot_nets(App $a, &$b)
|
function dwpost_jot_nets(App $a, &$b)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
* Status: Unsupported
|
* Status: Unsupported
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Util\Network;
|
use Friendica\Util\Network;
|
||||||
|
|
||||||
// IMPORTANT: SET THIS to your fortunate server
|
// IMPORTANT: SET THIS to your fortunate server
|
||||||
|
@ -15,7 +15,7 @@ define('FORTUNATE_SERVER', 'hostname.com');
|
||||||
|
|
||||||
function fortunate_install()
|
function fortunate_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
|
Hook::register('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
|
||||||
if (FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
|
if (FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
|
||||||
notice('Fortunate addon requires configuration. See README');
|
notice('Fortunate addon requires configuration. See README');
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ function fortunate_install()
|
||||||
|
|
||||||
function fortunate_uninstall()
|
function fortunate_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
|
Hook::unregister('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ use Friendica\App;
|
||||||
use Friendica\Content\Nav;
|
use Friendica\Content\Nav;
|
||||||
use Friendica\Content\Pager;
|
use Friendica\Content\Pager;
|
||||||
use Friendica\Content\Widget;
|
use Friendica\Content\Widget;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
@ -26,12 +26,12 @@ require_once 'include/text.php';
|
||||||
|
|
||||||
function forumdirectory_install()
|
function forumdirectory_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
|
Hook::register('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function forumdirectory_uninstall()
|
function forumdirectory_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
|
Hook::unregister('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function forumdirectory_module()
|
function forumdirectory_module()
|
||||||
|
|
|
@ -6,25 +6,25 @@
|
||||||
* Author: Commander Zot
|
* Author: Commander Zot
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function fromapp_install()
|
function fromapp_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
|
Hook::register('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
|
||||||
Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
|
Hook::register('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
|
Hook::register('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
|
||||||
Logger::log("installed fromapp");
|
Logger::log("installed fromapp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function fromapp_uninstall()
|
function fromapp_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
|
Hook::unregister('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
|
Hook::unregister('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
|
||||||
Logger::log("removed fromapp");
|
Logger::log("removed fromapp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
|
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -26,19 +26,19 @@ require_once 'mod/parse_url.php';
|
||||||
require_once 'include/text.php';
|
require_once 'include/text.php';
|
||||||
|
|
||||||
function fromgplus_install() {
|
function fromgplus_install() {
|
||||||
Addon::registerHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
Hook::register('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
Hook::register('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||||
Addon::registerHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
Hook::register('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
||||||
}
|
}
|
||||||
|
|
||||||
function fromgplus_uninstall() {
|
function fromgplus_uninstall() {
|
||||||
Addon::unregisterHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
Hook::unregister('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||||
Addon::unregisterHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
Hook::unregister('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
|
||||||
|
|
||||||
// Old hooks
|
// Old hooks
|
||||||
Addon::unregisterHook('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
Hook::unregister('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function fromgplus_addon_settings(&$a,&$s) {
|
function fromgplus_addon_settings(&$a,&$s) {
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* Version: 0.1
|
* Version: 0.1
|
||||||
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -16,15 +16,15 @@ use Friendica\Util\Strings;
|
||||||
|
|
||||||
function geocoordinates_install()
|
function geocoordinates_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
Hook::register('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||||
Addon::registerHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
Hook::register('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function geocoordinates_uninstall()
|
function geocoordinates_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
Hook::unregister('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||||
Addon::unregisterHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
Hook::unregister('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
function geocoordinates_resolve_item(&$item)
|
function geocoordinates_resolve_item(&$item)
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
* system will call the name_uninstall() function.
|
* system will call the name_uninstall() function.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -31,7 +31,7 @@ use Friendica\Util\XML;
|
||||||
|
|
||||||
function geonames_install() {
|
function geonames_install() {
|
||||||
|
|
||||||
Addon::registerHook('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
|
Hook::register('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -40,7 +40,7 @@ function geonames_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::registerHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
Hook::register('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -50,8 +50,8 @@ function geonames_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::registerHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
|
Hook::register('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
|
Hook::register('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
|
||||||
|
|
||||||
Logger::log("installed geonames");
|
Logger::log("installed geonames");
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,10 @@ function geonames_uninstall() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::unregisterHook('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
|
Hook::unregister('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
|
||||||
Addon::unregisterHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
Hook::unregister('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
|
Hook::unregister('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
|
Hook::unregister('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
|
||||||
|
|
||||||
|
|
||||||
Logger::log("removed geonames");
|
Logger::log("removed geonames");
|
||||||
|
|
|
@ -7,16 +7,16 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function gnot_install() {
|
function gnot_install() {
|
||||||
|
|
||||||
Addon::registerHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
|
Hook::register('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
|
Hook::register('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
|
||||||
Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
|
Hook::register('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
|
||||||
|
|
||||||
Logger::log("installed gnot");
|
Logger::log("installed gnot");
|
||||||
}
|
}
|
||||||
|
@ -24,9 +24,9 @@ function gnot_install() {
|
||||||
|
|
||||||
function gnot_uninstall() {
|
function gnot_uninstall() {
|
||||||
|
|
||||||
Addon::unregisterHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
|
Hook::unregister('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
|
||||||
Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
|
Hook::unregister('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
|
||||||
|
|
||||||
|
|
||||||
Logger::log("removed gnot");
|
Logger::log("removed gnot");
|
||||||
|
|
|
@ -6,20 +6,19 @@
|
||||||
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Cache;
|
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
|
|
||||||
function googlemaps_install()
|
function googlemaps_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
|
Hook::register('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
|
||||||
|
|
||||||
Logger::log("installed googlemaps");
|
Logger::log("installed googlemaps");
|
||||||
}
|
}
|
||||||
|
|
||||||
function googlemaps_uninstall()
|
function googlemaps_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
|
Hook::unregister('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
|
||||||
|
|
||||||
Logger::log("removed googlemaps");
|
Logger::log("removed googlemaps");
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,21 +8,20 @@
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\BaseModule;
|
use Friendica\BaseModule;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\Util\Security;
|
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installs the addon hook
|
* Installs the addon hook
|
||||||
*/
|
*/
|
||||||
function gravatar_install() {
|
function gravatar_install() {
|
||||||
Addon::registerHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
|
Hook::register('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
|
||||||
Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
|
Hook::register('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
|
||||||
|
|
||||||
Logger::log("registered gravatar in avatar_lookup hook");
|
Logger::log("registered gravatar in avatar_lookup hook");
|
||||||
}
|
}
|
||||||
|
@ -31,8 +30,8 @@ function gravatar_install() {
|
||||||
* Removes the addon hook
|
* Removes the addon hook
|
||||||
*/
|
*/
|
||||||
function gravatar_uninstall() {
|
function gravatar_uninstall() {
|
||||||
Addon::unregisterHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
|
Hook::unregister('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
|
||||||
Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
|
Hook::unregister('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
|
||||||
|
|
||||||
Logger::log("unregistered gravatar in avatar_lookup hook");
|
Logger::log("unregistered gravatar in avatar_lookup hook");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
|
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function group_text_install() {
|
function group_text_install() {
|
||||||
|
|
||||||
Addon::registerHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
|
Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
||||||
|
|
||||||
Logger::log("installed group_text");
|
Logger::log("installed group_text");
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,8 @@ function group_text_install() {
|
||||||
|
|
||||||
function group_text_uninstall() {
|
function group_text_uninstall() {
|
||||||
|
|
||||||
Addon::unregisterHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
|
Hook::unregister('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
||||||
|
|
||||||
|
|
||||||
Logger::log("removed group_text");
|
Logger::log("removed group_text");
|
||||||
|
|
|
@ -7,18 +7,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function highlightjs_install()
|
function highlightjs_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('head' , __FILE__, 'highlightjs_head');
|
Hook::register('head' , __FILE__, 'highlightjs_head');
|
||||||
Addon::registerHook('footer', __FILE__, 'highlightjs_footer');
|
Hook::register('footer', __FILE__, 'highlightjs_footer');
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlightjs_uninstall()
|
function highlightjs_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('head' , __FILE__, 'highlightjs_head');
|
Hook::unregister('head' , __FILE__, 'highlightjs_head');
|
||||||
Addon::unregisterHook('footer', __FILE__, 'highlightjs_footer');
|
Hook::unregister('footer', __FILE__, 'highlightjs_footer');
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlightjs_head(App $a, &$b)
|
function highlightjs_head(App $a, &$b)
|
||||||
|
|
|
@ -11,7 +11,7 @@ require_once 'include/items.php';
|
||||||
require_once 'include/text.php';
|
require_once 'include/text.php';
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -22,14 +22,14 @@ use Friendica\Util\Strings;
|
||||||
|
|
||||||
function ifttt_install()
|
function ifttt_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
|
Hook::register('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
|
Hook::register('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function ifttt_uninstall()
|
function ifttt_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
|
Hook::unregister('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function ifttt_module()
|
function ifttt_module()
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -19,20 +19,20 @@ use Friendica\Util\XML;
|
||||||
|
|
||||||
function ijpost_install()
|
function ijpost_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
|
Hook::register('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
|
Hook::register('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
|
Hook::register('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
|
Hook::register('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
|
Hook::register('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function ijpost_uninstall()
|
function ijpost_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
|
Hook::unregister('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
|
Hook::unregister('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
|
Hook::unregister('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
|
Hook::unregister('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function ijpost_jot_nets(&$a, &$b)
|
function ijpost_jot_nets(&$a, &$b)
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -17,16 +17,16 @@ use Friendica\Util\Proxy as ProxyUtils;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
function impressum_install() {
|
function impressum_install() {
|
||||||
Addon::registerHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
|
Hook::register('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
|
||||||
Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
|
Hook::register('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
|
||||||
Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
|
Hook::register('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
|
||||||
Logger::log("installed impressum Addon");
|
Logger::log("installed impressum Addon");
|
||||||
}
|
}
|
||||||
|
|
||||||
function impressum_uninstall() {
|
function impressum_uninstall() {
|
||||||
Addon::unregisterHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
|
Hook::unregister('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
|
||||||
Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
|
Hook::unregister('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
|
||||||
Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
|
Hook::unregister('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
|
||||||
Logger::log("uninstalled impressum Addon");
|
Logger::log("uninstalled impressum Addon");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,17 @@
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
|
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
|
||||||
function infiniteimprobabilitydrive_install()
|
function infiniteimprobabilitydrive_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
|
Hook::register('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function infiniteimprobabilitydrive_uninstall()
|
function infiniteimprobabilitydrive_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
|
Hook::unregister('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function infiniteimprobabilitydrive_app_menu($a, &$b)
|
function infiniteimprobabilitydrive_app_menu($a, &$b)
|
||||||
|
|
12
irc/irc.php
12
irc/irc.php
|
@ -6,21 +6,21 @@
|
||||||
* Author: tony baldwin <https://free-haven.org/profile/tony>
|
* Author: tony baldwin <https://free-haven.org/profile/tony>
|
||||||
* Author: Tobias Diekershoff <https://f.diekershoff.de/u/tobias>
|
* Author: Tobias Diekershoff <https://f.diekershoff.de/u/tobias>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
|
||||||
function irc_install() {
|
function irc_install() {
|
||||||
Addon::registerHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
|
Hook::register('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
|
||||||
Addon::registerHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
|
Hook::register('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function irc_uninstall() {
|
function irc_uninstall() {
|
||||||
Addon::unregisterHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
|
Hook::unregister('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
|
Hook::unregister('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -75,16 +75,16 @@ use Friendica\Util\Network;
|
||||||
|
|
||||||
function jappixmini_install()
|
function jappixmini_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
|
Hook::register('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
|
Hook::register('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
|
||||||
|
|
||||||
Addon::registerHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
|
Hook::register('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
|
||||||
Addon::registerHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
|
Hook::register('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
|
||||||
|
|
||||||
Addon::registerHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
|
Hook::register('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
|
||||||
|
|
||||||
// Jappix source download as required by AGPL
|
// Jappix source download as required by AGPL
|
||||||
Addon::registerHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
|
Hook::register('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
|
||||||
|
|
||||||
// set standard configuration
|
// set standard configuration
|
||||||
$info_text = Config::get("jappixmini", "infotext");
|
$info_text = Config::get("jappixmini", "infotext");
|
||||||
|
@ -109,15 +109,15 @@ function jappixmini_install()
|
||||||
|
|
||||||
function jappixmini_uninstall()
|
function jappixmini_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
|
Hook::unregister('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
|
||||||
|
|
||||||
Addon::unregisterHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
|
Hook::unregister('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
|
||||||
Addon::unregisterHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
|
Hook::unregister('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
|
||||||
|
|
||||||
Addon::unregisterHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
|
Hook::unregister('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
|
||||||
|
|
||||||
Addon::unregisterHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
|
Hook::unregister('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
|
||||||
}
|
}
|
||||||
|
|
||||||
function jappixmini_addon_admin(App $a, &$o)
|
function jappixmini_addon_admin(App $a, &$o)
|
||||||
|
@ -193,14 +193,14 @@ function jappixmini_init()
|
||||||
// of local users
|
// of local users
|
||||||
$dfrn_id = $_REQUEST["dfrn_id"];
|
$dfrn_id = $_REQUEST["dfrn_id"];
|
||||||
if (!$dfrn_id) {
|
if (!$dfrn_id) {
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$role = $_REQUEST["role"];
|
$role = $_REQUEST["role"];
|
||||||
if ($role == "pub") {
|
if ($role == "pub") {
|
||||||
$r = q("SELECT * FROM `contact` WHERE LENGTH(`pubkey`) AND `dfrn-id`='%s' LIMIT 1", DBA::escape($dfrn_id));
|
$r = q("SELECT * FROM `contact` WHERE LENGTH(`pubkey`) AND `dfrn-id`='%s' LIMIT 1", DBA::escape($dfrn_id));
|
||||||
if (!count($r)) {
|
if (!count($r)) {
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$encrypt_func = openssl_public_encrypt;
|
$encrypt_func = openssl_public_encrypt;
|
||||||
|
@ -209,14 +209,14 @@ function jappixmini_init()
|
||||||
} else if ($role == "prv") {
|
} else if ($role == "prv") {
|
||||||
$r = q("SELECT * FROM `contact` WHERE LENGTH(`prvkey`) AND `issued-id`='%s' LIMIT 1", DBA::escape($dfrn_id));
|
$r = q("SELECT * FROM `contact` WHERE LENGTH(`prvkey`) AND `issued-id`='%s' LIMIT 1", DBA::escape($dfrn_id));
|
||||||
if (!count($r)) {
|
if (!count($r)) {
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$encrypt_func = openssl_private_encrypt;
|
$encrypt_func = openssl_private_encrypt;
|
||||||
$decrypt_func = openssl_private_decrypt;
|
$decrypt_func = openssl_private_decrypt;
|
||||||
$key = $r[0]["prvkey"];
|
$key = $r[0]["prvkey"];
|
||||||
} else {
|
} else {
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$uid = $r[0]["uid"];
|
$uid = $r[0]["uid"];
|
||||||
|
@ -238,7 +238,7 @@ function jappixmini_init()
|
||||||
// do not return an address if user deactivated addon
|
// do not return an address if user deactivated addon
|
||||||
$activated = PConfig::get($uid, 'jappixmini', 'activate');
|
$activated = PConfig::get($uid, 'jappixmini', 'activate');
|
||||||
if (!$activated) {
|
if (!$activated) {
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// return the requested Jabber address
|
// return the requested Jabber address
|
||||||
|
@ -259,9 +259,9 @@ function jappixmini_init()
|
||||||
|
|
||||||
$answer_json = json_encode($answer);
|
$answer_json = json_encode($answer);
|
||||||
echo $answer_json;
|
echo $answer_json;
|
||||||
killme();
|
exit();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,24 +14,24 @@
|
||||||
* Module Author: Chris Case
|
* Module Author: Chris Case
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
|
|
||||||
function js_upload_install() {
|
function js_upload_install() {
|
||||||
Addon::registerHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
|
Hook::register('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
|
||||||
Addon::registerHook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
|
Hook::register('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
|
||||||
Addon::registerHook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
|
Hook::register('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
|
||||||
Addon::registerHook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
|
Hook::register('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function js_upload_uninstall() {
|
function js_upload_uninstall() {
|
||||||
Addon::unregisterHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
|
Hook::unregister('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
|
||||||
Addon::unregisterHook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
|
Hook::unregister('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
|
||||||
Addon::unregisterHook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
|
Hook::unregister('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
|
||||||
Addon::unregisterHook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
|
Hook::unregister('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ function js_upload_post_init(&$a,&$b) {
|
||||||
if(isset($result['error'])) {
|
if(isset($result['error'])) {
|
||||||
Logger::log('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'] , Logger::DEBUG);
|
Logger::log('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'] , Logger::DEBUG);
|
||||||
echo json_encode($result);
|
echo json_encode($result);
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$a->data['upload_result'] = $result;
|
$a->data['upload_result'] = $result;
|
||||||
|
@ -185,7 +185,7 @@ function js_upload_post_end(&$a,&$b) {
|
||||||
Logger::log('upload_post_end');
|
Logger::log('upload_post_end');
|
||||||
if(!empty($a->data['upload_jsonresponse'])) {
|
if(!empty($a->data['upload_jsonresponse'])) {
|
||||||
echo $a->data['upload_jsonresponse'];
|
echo $a->data['upload_jsonresponse'];
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
*"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere
|
*"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -23,7 +23,7 @@ function krynn_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::registerHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
|
Hook::register('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -33,8 +33,8 @@ function krynn_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::registerHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
|
Hook::register('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
|
Hook::register('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
|
||||||
|
|
||||||
Logger::log("installed krynn");
|
Logger::log("installed krynn");
|
||||||
}
|
}
|
||||||
|
@ -50,9 +50,9 @@ function krynn_uninstall() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::unregisterHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
|
Hook::unregister('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
|
Hook::unregister('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
|
||||||
|
|
||||||
|
|
||||||
Logger::log("removed krynn");
|
Logger::log("removed krynn");
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -21,17 +21,17 @@ use Friendica\Core\Renderer;
|
||||||
|
|
||||||
function langfilter_install()
|
function langfilter_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
|
Hook::register('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
|
||||||
Addon::registerHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
|
Hook::register('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function langfilter_uninstall()
|
function langfilter_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
|
Hook::unregister('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
|
||||||
Addon::unregisterHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
|
Hook::unregister('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
|
Hook::unregister('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The settings
|
/* The settings
|
||||||
|
|
|
@ -53,21 +53,21 @@
|
||||||
*
|
*
|
||||||
* ...etc.
|
* ...etc.
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
|
|
||||||
function ldapauth_install()
|
function ldapauth_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
|
Hook::register('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
|
||||||
Addon::registerHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
|
Hook::register('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
|
||||||
}
|
}
|
||||||
|
|
||||||
function ldapauth_uninstall()
|
function ldapauth_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
|
Hook::unregister('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
|
||||||
Addon::unregisterHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
|
Hook::unregister('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
|
||||||
}
|
}
|
||||||
|
|
||||||
function ldapauth_load_config(\Friendica\App $a)
|
function ldapauth_load_config(\Friendica\App $a)
|
||||||
|
|
|
@ -5,22 +5,22 @@
|
||||||
* Version: 0.1
|
* Version: 0.1
|
||||||
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Util\Network;
|
use Friendica\Util\Network;
|
||||||
|
|
||||||
function leistungsschutzrecht_install() {
|
function leistungsschutzrecht_install() {
|
||||||
Addon::registerHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
|
Hook::register('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
|
||||||
Addon::registerHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
|
Hook::register('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
|
||||||
Addon::registerHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
|
Hook::register('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function leistungsschutzrecht_uninstall() {
|
function leistungsschutzrecht_uninstall() {
|
||||||
Addon::unregisterHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
|
Hook::unregister('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
|
||||||
Addon::unregisterHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
|
Hook::unregister('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
|
||||||
Addon::unregisterHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
|
Hook::unregister('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
|
||||||
}
|
}
|
||||||
|
|
||||||
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
|
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -17,22 +17,22 @@ use Friendica\Util\Network;
|
||||||
|
|
||||||
function libertree_install()
|
function libertree_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
|
Hook::register('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
|
||||||
Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
|
Hook::register('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
|
Hook::register('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
|
Hook::register('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
|
Hook::register('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
|
Hook::register('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function libertree_uninstall()
|
function libertree_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
|
Hook::unregister('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
|
||||||
Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
|
Hook::unregister('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
|
Hook::unregister('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
|
Hook::unregister('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
|
Hook::unregister('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function libertree_jot_nets(&$a,&$b) {
|
function libertree_jot_nets(&$a,&$b) {
|
||||||
|
|
|
@ -8,13 +8,12 @@
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\BaseModule;
|
use Friendica\BaseModule;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\Util\Security;
|
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,8 +21,8 @@ use Friendica\Util\Strings;
|
||||||
*/
|
*/
|
||||||
function libravatar_install()
|
function libravatar_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
|
Hook::register('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
|
||||||
Addon::registerHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
|
Hook::register('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
|
||||||
Logger::log("registered libravatar in avatar_lookup hook");
|
Logger::log("registered libravatar in avatar_lookup hook");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,8 +31,8 @@ function libravatar_install()
|
||||||
*/
|
*/
|
||||||
function libravatar_uninstall()
|
function libravatar_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
|
Hook::unregister('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
|
||||||
Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
|
Hook::unregister('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
|
||||||
Logger::log("unregistered libravatar in avatar_lookup hook");
|
Logger::log("unregistered libravatar in avatar_lookup hook");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -18,19 +18,19 @@ use Friendica\Util\Network;
|
||||||
use Friendica\Util\XML;
|
use Friendica\Util\XML;
|
||||||
|
|
||||||
function ljpost_install() {
|
function ljpost_install() {
|
||||||
Addon::registerHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
Hook::register('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
|
Hook::register('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
|
Hook::register('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
|
Hook::register('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
|
Hook::register('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
|
||||||
|
|
||||||
}
|
}
|
||||||
function ljpost_uninstall() {
|
function ljpost_uninstall() {
|
||||||
Addon::unregisterHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
Hook::unregister('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
|
Hook::unregister('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
|
Hook::unregister('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
|
Hook::unregister('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Holger Froese
|
* Author: Holger Froese
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function mahjongg_install() {
|
function mahjongg_install() {
|
||||||
Addon::registerHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
|
Hook::register('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function mahjongg_uninstall() {
|
function mahjongg_uninstall() {
|
||||||
Addon::unregisterHook('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
|
Hook::unregister('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -18,11 +18,11 @@ use Friendica\Util\Network;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
|
|
||||||
function mailstream_install() {
|
function mailstream_install() {
|
||||||
Addon::registerHook('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
|
Hook::register('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
|
||||||
Addon::registerHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
|
Hook::register('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
|
||||||
Addon::registerHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
|
Hook::register('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
|
||||||
Addon::registerHook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
|
Hook::register('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
|
||||||
|
|
||||||
if (Config::get('mailstream', 'dbversion') == '0.1') {
|
if (Config::get('mailstream', 'dbversion') == '0.1') {
|
||||||
q('ALTER TABLE `mailstream_item` DROP INDEX `uid`');
|
q('ALTER TABLE `mailstream_item` DROP INDEX `uid`');
|
||||||
|
@ -59,16 +59,16 @@ function mailstream_install() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function mailstream_uninstall() {
|
function mailstream_uninstall() {
|
||||||
Addon::unregisterHook('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
|
Hook::unregister('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
|
||||||
Addon::unregisterHook('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
|
Hook::unregister('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
|
||||||
Addon::unregisterHook('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
|
Hook::unregister('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
|
||||||
Addon::unregisterHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
|
Hook::unregister('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
|
||||||
Addon::unregisterHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
|
Hook::unregister('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
|
||||||
Addon::unregisterHook('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
|
Hook::unregister('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
|
||||||
Addon::unregisterHook('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
|
Hook::unregister('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
|
||||||
Addon::unregisterHook('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
|
Hook::unregister('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
|
||||||
Addon::unregisterHook('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
|
Hook::unregister('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
|
||||||
}
|
}
|
||||||
|
|
||||||
function mailstream_module() {}
|
function mailstream_module() {}
|
||||||
|
|
|
@ -11,31 +11,31 @@
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Smilies;
|
use Friendica\Content\Smilies;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Protocol;
|
use Friendica\Core\Protocol;
|
||||||
use Friendica\Util\Network;
|
use Friendica\Util\Network;
|
||||||
use Friendica\Util\Proxy as ProxyUtils;
|
use Friendica\Util\Proxy as ProxyUtils;
|
||||||
|
|
||||||
function mastodoncustomemojis_install()
|
function mastodoncustomemojis_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('put_item_in_cache', __FILE__, 'mastodoncustomemojis_put_item_in_cache');
|
Hook::register('put_item_in_cache', __FILE__, 'mastodoncustomemojis_put_item_in_cache');
|
||||||
Addon::registerHook('network_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::register('network_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
Addon::registerHook('display_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::register('display_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
Addon::registerHook('search_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::register('search_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
Addon::registerHook('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::register('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
Addon::registerHook('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::register('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
function mastodoncustomemojis_uninstall()
|
function mastodoncustomemojis_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('put_item_in_cache', __FILE__, 'mastodoncustomemojis_put_item_in_cache');
|
Hook::unregister('put_item_in_cache', __FILE__, 'mastodoncustomemojis_put_item_in_cache');
|
||||||
Addon::unregisterHook('network_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::unregister('network_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
Addon::unregisterHook('display_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::unregister('display_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
Addon::unregisterHook('search_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::unregister('search_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
Addon::unregisterHook('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::unregister('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
Addon::unregisterHook('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
Hook::unregister('contacts_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
function mastodoncustomemojis_css_hook(App $a)
|
function mastodoncustomemojis_css_hook(App $a)
|
||||||
|
|
|
@ -9,28 +9,28 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
|
||||||
function mathjax_install()
|
function mathjax_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('footer' , __FILE__, 'mathjax_footer');
|
Hook::register('footer' , __FILE__, 'mathjax_footer');
|
||||||
Addon::registerHook('addon_settings' , __FILE__, 'mathjax_settings');
|
Hook::register('addon_settings' , __FILE__, 'mathjax_settings');
|
||||||
Addon::registerHook('addon_settings_post', __FILE__, 'mathjax_settings_post');
|
Hook::register('addon_settings_post', __FILE__, 'mathjax_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function mathjax_uninstall()
|
function mathjax_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('footer' , __FILE__, 'mathjax_footer');
|
Hook::unregister('footer' , __FILE__, 'mathjax_footer');
|
||||||
Addon::unregisterHook('addon_settings' , __FILE__, 'mathjax_settings');
|
Hook::unregister('addon_settings' , __FILE__, 'mathjax_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', __FILE__, 'mathjax_settings_post');
|
Hook::unregister('addon_settings_post', __FILE__, 'mathjax_settings_post');
|
||||||
|
|
||||||
// Legacy hooks
|
// Legacy hooks
|
||||||
Addon::unregisterHook('load_config' , __FILE__, 'mathjax_load_config');
|
Hook::unregister('load_config' , __FILE__, 'mathjax_load_config');
|
||||||
Addon::unregisterHook('page_header' , __FILE__, 'mathjax_page_header');
|
Hook::unregister('page_header' , __FILE__, 'mathjax_page_header');
|
||||||
Addon::unregisterHook('template_vars' , __FILE__, 'mathjax_template_vars');
|
Hook::unregister('template_vars' , __FILE__, 'mathjax_template_vars');
|
||||||
}
|
}
|
||||||
|
|
||||||
function mathjax_settings_post($a)
|
function mathjax_settings_post($a)
|
||||||
|
|
|
@ -7,18 +7,18 @@
|
||||||
* Status: Unsupported
|
* Status: Unsupported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
|
|
||||||
function membersince_install()
|
function membersince_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
|
Hook::register('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
|
||||||
}
|
}
|
||||||
|
|
||||||
function membersince_uninstall()
|
function membersince_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
|
Hook::unregister('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
|
||||||
}
|
}
|
||||||
|
|
||||||
function membersince_display(Friendica\App $a, &$b)
|
function membersince_display(Friendica\App $a, &$b)
|
||||||
|
|
|
@ -8,26 +8,25 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Config;
|
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
|
||||||
function morechoice_install() {
|
function morechoice_install() {
|
||||||
|
|
||||||
Addon::registerHook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
|
Hook::register('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
|
||||||
Addon::registerHook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
|
Hook::register('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
|
||||||
Addon::registerHook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
|
Hook::register('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function morechoice_uninstall() {
|
function morechoice_uninstall() {
|
||||||
|
|
||||||
Addon::unregisterHook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
|
Hook::unregister('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
|
||||||
Addon::unregisterHook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
|
Hook::unregister('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
|
||||||
Addon::unregisterHook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
|
Hook::unregister('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
|
||||||
|
|
||||||
// We need to leave this here for a while, because we now have a situation where people can end up with an orphaned hook.
|
// We need to leave this here for a while, because we now have a situation where people can end up with an orphaned hook.
|
||||||
Addon::unregisterHook('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
|
Hook::unregister('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,17 @@
|
||||||
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
|
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
|
||||||
function morepokes_install()
|
function morepokes_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
|
Hook::register('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
|
||||||
}
|
}
|
||||||
|
|
||||||
function morepokes_uninstall()
|
function morepokes_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
|
Hook::unregister('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
|
||||||
}
|
}
|
||||||
|
|
||||||
function morepokes_poke_verbs($a, &$b)
|
function morepokes_poke_verbs($a, &$b)
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
* Status: Unsupported
|
* Status: Unsupported
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function namethingy_install() {
|
function namethingy_install() {
|
||||||
Addon::registerHook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
|
Hook::register('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function namethingy_uninstall() {
|
function namethingy_uninstall() {
|
||||||
Addon::unregisterHook('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
|
Hook::unregister('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
***/
|
***/
|
||||||
|
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -16,13 +16,13 @@ use Friendica\Util\Strings;
|
||||||
|
|
||||||
function newmemberwidget_install()
|
function newmemberwidget_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
|
Hook::register( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
|
||||||
Logger::log('newmemberwidget installed');
|
Logger::log('newmemberwidget installed');
|
||||||
}
|
}
|
||||||
|
|
||||||
function newmemberwidget_uninstall()
|
function newmemberwidget_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
|
Hook::unregister( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
|
||||||
}
|
}
|
||||||
|
|
||||||
function newmemberwidget_network_mod_init ($a, $b)
|
function newmemberwidget_network_mod_init ($a, $b)
|
||||||
|
|
|
@ -7,20 +7,20 @@
|
||||||
* Status: Unsupported
|
* Status: Unsupported
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function notimeline_install()
|
function notimeline_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
|
Hook::register('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
|
Hook::register('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function notimeline_uninstall()
|
function notimeline_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
|
Hook::unregister('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function notimeline_settings_post($a, $post)
|
function notimeline_settings_post($a, $post)
|
||||||
|
|
|
@ -7,23 +7,23 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function nsfw_install()
|
function nsfw_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter', 10);
|
Hook::register('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter', 10);
|
||||||
Addon::registerHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
|
Hook::register('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function nsfw_uninstall()
|
function nsfw_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter');
|
Hook::unregister('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter');
|
||||||
Addon::unregisterHook('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
|
Hook::unregister('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
|
Hook::unregister('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function isn't perfect and isn't trying to preserve the html structure - it's just a
|
// This function isn't perfect and isn't trying to preserve the html structure - it's just a
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function numfriends_install() {
|
function numfriends_install() {
|
||||||
|
|
||||||
Addon::registerHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
|
Hook::register('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
|
Hook::register('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
|
||||||
|
|
||||||
Logger::log("installed numfriends");
|
Logger::log("installed numfriends");
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,8 @@ function numfriends_install() {
|
||||||
|
|
||||||
function numfriends_uninstall() {
|
function numfriends_uninstall() {
|
||||||
|
|
||||||
Addon::unregisterHook('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
|
Hook::unregister('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
|
||||||
|
|
||||||
|
|
||||||
Logger::log("removed numfriends");
|
Logger::log("removed numfriends");
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
* Author: Klaus Weidenbach
|
* Author: Klaus Weidenbach
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -25,24 +25,24 @@ const OSM_MARKER = 0;
|
||||||
|
|
||||||
function openstreetmap_install()
|
function openstreetmap_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('load_config', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
|
Hook::register('load_config', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
|
||||||
Addon::registerHook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
|
Hook::register('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
|
||||||
Addon::registerHook('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
|
Hook::register('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
|
||||||
Addon::registerHook('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
|
Hook::register('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
|
||||||
Addon::registerHook('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
|
Hook::register('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
|
||||||
Addon::registerHook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
|
Hook::register('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
|
||||||
|
|
||||||
Logger::log("installed openstreetmap");
|
Logger::log("installed openstreetmap");
|
||||||
}
|
}
|
||||||
|
|
||||||
function openstreetmap_uninstall()
|
function openstreetmap_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('load_config', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
|
Hook::unregister('load_config', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
|
||||||
Addon::unregisterHook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
|
Hook::unregister('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
|
||||||
Addon::unregisterHook('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
|
Hook::unregister('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
|
||||||
Addon::unregisterHook('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
|
Hook::unregister('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
|
||||||
Addon::unregisterHook('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
|
Hook::unregister('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
|
||||||
Addon::unregisterHook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
|
Hook::unregister('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
|
||||||
|
|
||||||
Logger::log("removed openstreetmap");
|
Logger::log("removed openstreetmap");
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,24 +9,25 @@
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
|
||||||
function pageheader_install() {
|
function pageheader_install() {
|
||||||
Addon::registerHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
|
Hook::register('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
|
||||||
Addon::registerHook('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
|
Hook::register('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function pageheader_uninstall() {
|
function pageheader_uninstall() {
|
||||||
Addon::unregisterHook('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
|
Hook::unregister('page_content_top', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
|
Hook::unregister('addon_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
|
||||||
|
|
||||||
// hook moved, uninstall the old one if still there.
|
// hook moved, uninstall the old one if still there.
|
||||||
Addon::unregisterHook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
|
Hook::unregister('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,23 +30,23 @@
|
||||||
* about http/https but beware to put the trailing / at the end of your
|
* about http/https but beware to put the trailing / at the end of your
|
||||||
* setting.
|
* setting.
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
function piwik_install() {
|
function piwik_install() {
|
||||||
Addon::registerHook('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
|
Hook::register('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
|
||||||
Addon::registerHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
|
Hook::register('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
|
||||||
|
|
||||||
Logger::log("installed piwik addon");
|
Logger::log("installed piwik addon");
|
||||||
}
|
}
|
||||||
|
|
||||||
function piwik_uninstall() {
|
function piwik_uninstall() {
|
||||||
Addon::unregisterHook('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
|
Hook::unregister('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
|
||||||
Addon::unregisterHook('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
|
Hook::unregister('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
|
||||||
|
|
||||||
Logger::log("uninstalled piwik addon");
|
Logger::log("uninstalled piwik addon");
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
* Author: Tony Baldwin <https://free-haven.org/profile/tony>
|
* Author: Tony Baldwin <https://free-haven.org/profile/tony>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -20,7 +20,7 @@ function planets_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::registerHook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
|
Hook::register('post_local', 'addon/planets/planets.php', 'planets_post_hook');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -30,8 +30,8 @@ function planets_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::registerHook('addon_settings', 'addon/planets/planets.php', 'planets_settings');
|
Hook::register('addon_settings', 'addon/planets/planets.php', 'planets_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
|
Hook::register('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
|
||||||
|
|
||||||
Logger::log("installed planets");
|
Logger::log("installed planets");
|
||||||
}
|
}
|
||||||
|
@ -47,9 +47,9 @@ function planets_uninstall() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::unregisterHook('post_local', 'addon/planets/planets.php', 'planets_post_hook');
|
Hook::unregister('post_local', 'addon/planets/planets.php', 'planets_post_hook');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/planets/planets.php', 'planets_settings');
|
Hook::unregister('addon_settings', 'addon/planets/planets.php', 'planets_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
|
||||||
|
|
||||||
|
|
||||||
Logger::log("removed planets");
|
Logger::log("removed planets");
|
||||||
|
|
|
@ -7,20 +7,20 @@
|
||||||
* Hauke Altmann <https://snarl.de/profile/tugelblend>
|
* Hauke Altmann <https://snarl.de/profile/tugelblend>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
|
||||||
function pledgie_install() {
|
function pledgie_install() {
|
||||||
Addon::registerHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
|
Hook::register('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
|
||||||
Addon::registerHook('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
|
Hook::register('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function pledgie_uninstall() {
|
function pledgie_uninstall() {
|
||||||
Addon::unregisterHook('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
|
Hook::unregister('page_end', 'addon/pledgie/pledgie.php', 'pledgie_active');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
|
Hook::unregister('addon_settings', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/pledgie/pledgie.php', 'pledgie_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function pledgie_addon_settings(&$a,&$s) {
|
function pledgie_addon_settings(&$a,&$s) {
|
||||||
|
|
|
@ -10,6 +10,7 @@ use Friendica\App;
|
||||||
use Friendica\BaseModule;
|
use Friendica\BaseModule;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -19,20 +20,20 @@ use Friendica\Util\Strings;
|
||||||
|
|
||||||
function public_server_install()
|
function public_server_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('load_config', 'addon/public_server/public_server.php', 'public_server_load_config');
|
Hook::register('load_config', 'addon/public_server/public_server.php', 'public_server_load_config');
|
||||||
Addon::registerHook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
|
Hook::register('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
|
||||||
Addon::registerHook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
|
Hook::register('cron', 'addon/public_server/public_server.php', 'public_server_cron');
|
||||||
Addon::registerHook('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
|
Hook::register('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
|
||||||
Addon::registerHook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
|
Hook::register('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
|
||||||
}
|
}
|
||||||
|
|
||||||
function public_server_uninstall()
|
function public_server_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('load_config', 'addon/public_server/public_server.php', 'public_server_load_config');
|
Hook::unregister('load_config', 'addon/public_server/public_server.php', 'public_server_load_config');
|
||||||
Addon::unregisterHook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
|
Hook::unregister('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
|
||||||
Addon::unregisterHook('cron', 'addon/public_server/public_server.php', 'public_server_cron');
|
Hook::unregister('cron', 'addon/public_server/public_server.php', 'public_server_cron');
|
||||||
Addon::unregisterHook('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
|
Hook::unregister('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
|
||||||
Addon::unregisterHook('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
|
Hook::unregister('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
|
||||||
}
|
}
|
||||||
|
|
||||||
function public_server_load_config(App $a)
|
function public_server_load_config(App $a)
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -37,30 +37,30 @@ define('PUMPIO_DEFAULT_POLL_INTERVAL', 5); // given in minutes
|
||||||
|
|
||||||
function pumpio_install()
|
function pumpio_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
|
Hook::register('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
|
||||||
Addon::registerHook('hook_fork', 'addon/pumpio/pumpio.php', 'hook_fork');
|
Hook::register('hook_fork', 'addon/pumpio/pumpio.php', 'hook_fork');
|
||||||
Addon::registerHook('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
|
Hook::register('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
|
Hook::register('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
|
Hook::register('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
|
Hook::register('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
|
Hook::register('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
|
||||||
Addon::registerHook('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
|
Hook::register('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
|
||||||
Addon::registerHook('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
|
Hook::register('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
|
||||||
Addon::registerHook('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
|
Hook::register('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
|
||||||
}
|
}
|
||||||
|
|
||||||
function pumpio_uninstall()
|
function pumpio_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
|
Hook::unregister('load_config', 'addon/pumpio/pumpio.php', 'pumpio_load_config');
|
||||||
Addon::unregisterHook('hook_fork', 'addon/pumpio/pumpio.php', 'pumpio_hook_fork');
|
Hook::unregister('hook_fork', 'addon/pumpio/pumpio.php', 'pumpio_hook_fork');
|
||||||
Addon::unregisterHook('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
|
Hook::unregister('post_local', 'addon/pumpio/pumpio.php', 'pumpio_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
|
Hook::unregister('notifier_normal', 'addon/pumpio/pumpio.php', 'pumpio_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
|
Hook::unregister('jot_networks', 'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
|
Hook::unregister('connector_settings', 'addon/pumpio/pumpio.php', 'pumpio_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
|
||||||
Addon::unregisterHook('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
|
Hook::unregister('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
|
||||||
Addon::unregisterHook('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
|
Hook::unregister('queue_predeliver', 'addon/pumpio/pumpio.php', 'pumpio_queue_hook');
|
||||||
Addon::unregisterHook('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
|
Hook::unregister('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
|
||||||
}
|
}
|
||||||
|
|
||||||
function pumpio_module() {}
|
function pumpio_module() {}
|
||||||
|
|
|
@ -17,20 +17,20 @@
|
||||||
* them to open the comment window fully and insert the qcomment. Then "Submit" will submit it.
|
* them to open the comment window fully and insert the qcomment. Then "Submit" will submit it.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Util\XML;
|
use Friendica\Util\XML;
|
||||||
|
|
||||||
function qcomment_install() {
|
function qcomment_install() {
|
||||||
Addon::registerHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
|
Hook::register('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function qcomment_uninstall() {
|
function qcomment_uninstall() {
|
||||||
Addon::unregisterHook('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
|
Hook::unregister('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* system will call the name_uninstall() function.
|
* system will call the name_uninstall() function.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -32,7 +32,7 @@ function randplace_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::registerHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
|
Hook::register('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -42,8 +42,8 @@ function randplace_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::registerHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
|
Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
|
Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
|
||||||
|
|
||||||
Logger::log("installed randplace");
|
Logger::log("installed randplace");
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,9 @@ function randplace_uninstall() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Addon::unregisterHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
|
Hook::unregister('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
|
Hook::unregister('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
|
||||||
|
|
||||||
|
|
||||||
Logger::log("removed randplace");
|
Logger::log("removed randplace");
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
* Status: Unsupported
|
* Status: Unsupported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -16,15 +16,15 @@ use Friendica\Database\DBA;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
function remote_permissions_install() {
|
function remote_permissions_install() {
|
||||||
Addon::registerHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
|
Hook::register('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
|
||||||
Addon::registerHook('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
|
Hook::register('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
|
Hook::register('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function remote_permissions_uninstall() {
|
function remote_permissions_uninstall() {
|
||||||
Addon::unregisterHook('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
|
Hook::unregister('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
|
Hook::unregister('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function remote_permissions_settings(&$a,&$o) {
|
function remote_permissions_settings(&$a,&$o) {
|
||||||
|
@ -191,7 +191,7 @@ function remote_permissions_content($a, $item_copy) {
|
||||||
// Sort the names alphabetically, case-insensitive
|
// Sort the names alphabetically, case-insensitive
|
||||||
natcasesort($allow_names);
|
natcasesort($allow_names);
|
||||||
echo $o . implode(', ', $allow_names);
|
echo $o . implode(', ', $allow_names);
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -6,18 +6,18 @@
|
||||||
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
|
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
|
||||||
function rendertime_install() {
|
function rendertime_install() {
|
||||||
Addon::registerHook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
|
Hook::register('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function rendertime_uninstall() {
|
function rendertime_uninstall() {
|
||||||
Addon::unregisterHook('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
|
Hook::unregister('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
|
||||||
Addon::unregisterHook('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
|
Hook::unregister('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
|
||||||
}
|
}
|
||||||
|
|
||||||
function rendertime_init_1(&$a) {
|
function rendertime_init_1(&$a) {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -28,19 +28,19 @@ require_once 'openpgp_crypt_symmetric.php';
|
||||||
|
|
||||||
|
|
||||||
function securemail_install() {
|
function securemail_install() {
|
||||||
Addon::registerHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
Hook::register('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
Hook::register('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
||||||
|
|
||||||
Addon::registerHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
|
Hook::register('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
|
||||||
|
|
||||||
Logger::log('installed securemail');
|
Logger::log('installed securemail');
|
||||||
}
|
}
|
||||||
|
|
||||||
function securemail_uninstall() {
|
function securemail_uninstall() {
|
||||||
Addon::unregisterHook('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
Hook::unregister('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
|
||||||
|
|
||||||
Addon::unregisterHook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
|
Hook::unregister('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
|
||||||
|
|
||||||
Logger::log('removed securemail');
|
Logger::log('removed securemail');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,23 +7,23 @@
|
||||||
* based upon NSFW from Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* based upon NSFW from Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
function showmore_install()
|
function showmore_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
|
Hook::register('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
|
||||||
Addon::registerHook('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
|
Hook::register('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showmore_uninstall()
|
function showmore_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
|
Hook::unregister('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
|
Hook::unregister('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showmore_addon_settings(&$a, &$s)
|
function showmore_addon_settings(&$a, &$s)
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
* Author: Thomas Willingham (based on Mike Macgirvin's Adult Smile template)
|
* Author: Thomas Willingham (based on Mike Macgirvin's Adult Smile template)
|
||||||
* All smileys from sites offering them as Public Domain
|
* All smileys from sites offering them as Public Domain
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function smiley_pack_es_install() {
|
function smiley_pack_es_install() {
|
||||||
Addon::registerHook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
|
Hook::register('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
|
||||||
}
|
}
|
||||||
|
|
||||||
function smiley_pack_es_uninstall() {
|
function smiley_pack_es_uninstall() {
|
||||||
Addon::unregisterHook('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
|
Hook::unregister('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function smiley_pack_fr_install() {
|
function smiley_pack_fr_install() {
|
||||||
Addon::registerHook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
|
Hook::register('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
function smiley_pack_fr_uninstall() {
|
function smiley_pack_fr_uninstall() {
|
||||||
Addon::unregisterHook('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
|
Hook::unregister('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
* All smileys from sites offering them as Public Domain
|
* All smileys from sites offering them as Public Domain
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function smiley_pack_install() {
|
function smiley_pack_install() {
|
||||||
Addon::registerHook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
|
Hook::register('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
function smiley_pack_uninstall() {
|
function smiley_pack_uninstall() {
|
||||||
Addon::unregisterHook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
|
Hook::unregister('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
* Version: 0.2
|
* Version: 0.2
|
||||||
* Author: Johannes Schwab <https://friendica.jschwab.org/profile/ddorian>
|
* Author: Johannes Schwab <https://friendica.jschwab.org/profile/ddorian>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
|
|
||||||
function smileybutton_install() {
|
function smileybutton_install() {
|
||||||
//Register hooks
|
//Register hooks
|
||||||
Addon::registerHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
|
Hook::register('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
|
||||||
|
|
||||||
Logger::log("installed smileybutton");
|
Logger::log("installed smileybutton");
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ function smileybutton_install() {
|
||||||
|
|
||||||
function smileybutton_uninstall() {
|
function smileybutton_uninstall() {
|
||||||
//Delet registered hooks
|
//Delet registered hooks
|
||||||
Addon::unregisterHook('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
|
Hook::unregister('jot_tool', 'addon/smileybutton/smileybutton.php', 'show_button');
|
||||||
|
|
||||||
Logger::log("removed smileybutton");
|
Logger::log("removed smileybutton");
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ function show_button(Friendica\App $a, &$b) {
|
||||||
|
|
||||||
// Call hooks to get aditional smileies from other addons
|
// Call hooks to get aditional smileies from other addons
|
||||||
$params = ['texts' => $texts, 'icons' => $icons, 'string' => ""]; //changed
|
$params = ['texts' => $texts, 'icons' => $icons, 'string' => ""]; //changed
|
||||||
Addon::callHooks('smilie', $params);
|
Hook::callAll('smilie', $params);
|
||||||
|
|
||||||
//Generate html for smiley list
|
//Generate html for smiley list
|
||||||
$s = "<table class=\"smiley-preview\"><tr>\n\t";
|
$s = "<table class=\"smiley-preview\"><tr>\n\t";
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
* This is a template for how to extend the "smily" code.
|
* This is a template for how to extend the "smily" code.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function smilies_adult_install() {
|
function smilies_adult_install() {
|
||||||
Addon::registerHook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
|
Hook::register('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
function smilies_adult_uninstall() {
|
function smilies_adult_uninstall() {
|
||||||
Addon::unregisterHook('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
|
Hook::unregister('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function sniper_install() {
|
function sniper_install() {
|
||||||
Addon::registerHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
|
Hook::register('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function sniper_uninstall() {
|
function sniper_uninstall() {
|
||||||
Addon::unregisterHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
|
Hook::unregister('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,21 +6,21 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
|
||||||
function startpage_install() {
|
function startpage_install() {
|
||||||
Addon::registerHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
|
Hook::register('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
|
||||||
Addon::registerHook('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
|
Hook::register('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
|
Hook::register('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function startpage_uninstall()
|
function startpage_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
|
Hook::unregister('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
|
Hook::unregister('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function startpage_home_init($a, $b)
|
function startpage_home_init($a, $b)
|
||||||
|
|
|
@ -43,8 +43,8 @@ use Friendica\App;
|
||||||
use Friendica\Content\OEmbed;
|
use Friendica\Content\OEmbed;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Content\Text\Plaintext;
|
use Friendica\Content\Text\Plaintext;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -65,34 +65,34 @@ use Friendica\Util\Strings;
|
||||||
function statusnet_install()
|
function statusnet_install()
|
||||||
{
|
{
|
||||||
// we need some hooks, for the configuration and for sending tweets
|
// we need some hooks, for the configuration and for sending tweets
|
||||||
Addon::registerHook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
|
Hook::register('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
|
Hook::register('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
|
||||||
Addon::registerHook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
|
Hook::register('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
|
||||||
Addon::registerHook('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
|
Hook::register('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
|
||||||
Addon::registerHook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
|
Hook::register('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
|
||||||
Addon::registerHook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
|
Hook::register('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
|
||||||
Addon::registerHook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
|
Hook::register('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
|
||||||
Addon::registerHook('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
|
Hook::register('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
|
||||||
Addon::registerHook('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
|
Hook::register('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
|
||||||
Logger::log("installed GNU Social");
|
Logger::log("installed GNU Social");
|
||||||
}
|
}
|
||||||
|
|
||||||
function statusnet_uninstall()
|
function statusnet_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
|
Hook::unregister('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
|
Hook::unregister('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
|
||||||
Addon::unregisterHook('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
|
Hook::unregister('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
|
||||||
Addon::unregisterHook('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
|
Hook::unregister('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
|
Hook::unregister('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
|
||||||
Addon::unregisterHook('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
|
Hook::unregister('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
|
||||||
Addon::unregisterHook('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
|
Hook::unregister('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
|
||||||
Addon::unregisterHook('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
|
Hook::unregister('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
|
||||||
|
|
||||||
// old setting - remove only
|
// old setting - remove only
|
||||||
Addon::unregisterHook('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
|
Hook::unregister('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
|
Hook::unregister('addon_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function statusnet_check_item_notification(App $a, &$notification_data)
|
function statusnet_check_item_notification(App $a, &$notification_data)
|
||||||
|
|
|
@ -6,27 +6,27 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
function superblock_install()
|
function superblock_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
|
Hook::register('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
|
||||||
Addon::registerHook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
|
Hook::register('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
|
||||||
Addon::registerHook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
|
Hook::register('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
|
||||||
Addon::registerHook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
|
Hook::register('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
|
||||||
}
|
}
|
||||||
|
|
||||||
function superblock_uninstall()
|
function superblock_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
|
Hook::unregister('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
|
||||||
Addon::unregisterHook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
|
Hook::unregister('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
|
||||||
Addon::unregisterHook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
|
Hook::unregister('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
|
||||||
Addon::unregisterHook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
|
Hook::unregister('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
|
||||||
}
|
}
|
||||||
|
|
||||||
function superblock_addon_settings(&$a, &$s)
|
function superblock_addon_settings(&$a, &$s)
|
||||||
|
@ -164,5 +164,5 @@ function superblock_init(&$a)
|
||||||
|
|
||||||
PConfig::set(local_user(), 'system', 'blocked', $words);
|
PConfig::set(local_user(), 'system', 'blocked', $words);
|
||||||
info(L10n::t('superblock settings updated') . EOL );
|
info(L10n::t('superblock settings updated') . EOL );
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
|
@ -16,22 +16,22 @@ use Friendica\Util\DateTimeFormat;
|
||||||
|
|
||||||
function testdrive_install() {
|
function testdrive_install() {
|
||||||
|
|
||||||
Addon::registerHook('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
|
Hook::register('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
|
||||||
Addon::registerHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
|
Hook::register('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
|
||||||
Addon::registerHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
|
Hook::register('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
|
||||||
Addon::registerHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
|
Hook::register('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
|
||||||
Addon::registerHook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
|
Hook::register('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function testdrive_uninstall() {
|
function testdrive_uninstall() {
|
||||||
|
|
||||||
Addon::unregisterHook('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
|
Hook::unregister('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
|
||||||
Addon::unregisterHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
|
Hook::unregister('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
|
||||||
Addon::unregisterHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
|
Hook::unregister('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
|
||||||
Addon::unregisterHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
|
Hook::unregister('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
|
||||||
Addon::unregisterHook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
|
Hook::unregister('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,15 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
|
||||||
function tictac_install() {
|
function tictac_install() {
|
||||||
Addon::registerHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
|
Hook::register('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function tictac_uninstall() {
|
function tictac_uninstall() {
|
||||||
Addon::unregisterHook('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
|
Hook::unregister('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . '
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -22,22 +22,22 @@ use Friendica\Util\Strings;
|
||||||
|
|
||||||
function tumblr_install()
|
function tumblr_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
|
Hook::register('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
|
||||||
Addon::registerHook('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
|
Hook::register('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
|
Hook::register('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
|
Hook::register('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
|
Hook::register('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
|
Hook::register('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function tumblr_uninstall()
|
function tumblr_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
|
Hook::unregister('hook_fork', 'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
|
||||||
Addon::unregisterHook('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
|
Hook::unregister('post_local', 'addon/tumblr/tumblr.php', 'tumblr_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
|
Hook::unregister('notifier_normal', 'addon/tumblr/tumblr.php', 'tumblr_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
|
Hook::unregister('jot_networks', 'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
|
Hook::unregister('connector_settings', 'addon/tumblr/tumblr.php', 'tumblr_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function tumblr_module()
|
function tumblr_module()
|
||||||
|
|
|
@ -68,8 +68,8 @@ use Friendica\App;
|
||||||
use Friendica\Content\OEmbed;
|
use Friendica\Content\OEmbed;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Content\Text\Plaintext;
|
use Friendica\Content\Text\Plaintext;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -102,42 +102,42 @@ define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes
|
||||||
function twitter_install()
|
function twitter_install()
|
||||||
{
|
{
|
||||||
// we need some hooks, for the configuration and for sending tweets
|
// we need some hooks, for the configuration and for sending tweets
|
||||||
Addon::registerHook('load_config' , __FILE__, 'twitter_load_config');
|
Hook::register('load_config' , __FILE__, 'twitter_load_config');
|
||||||
Addon::registerHook('connector_settings' , __FILE__, 'twitter_settings');
|
Hook::register('connector_settings' , __FILE__, 'twitter_settings');
|
||||||
Addon::registerHook('connector_settings_post', __FILE__, 'twitter_settings_post');
|
Hook::register('connector_settings_post', __FILE__, 'twitter_settings_post');
|
||||||
Addon::registerHook('hook_fork' , __FILE__, 'twitter_hook_fork');
|
Hook::register('hook_fork' , __FILE__, 'twitter_hook_fork');
|
||||||
Addon::registerHook('post_local' , __FILE__, 'twitter_post_local');
|
Hook::register('post_local' , __FILE__, 'twitter_post_local');
|
||||||
Addon::registerHook('notifier_normal' , __FILE__, 'twitter_post_hook');
|
Hook::register('notifier_normal' , __FILE__, 'twitter_post_hook');
|
||||||
Addon::registerHook('jot_networks' , __FILE__, 'twitter_jot_nets');
|
Hook::register('jot_networks' , __FILE__, 'twitter_jot_nets');
|
||||||
Addon::registerHook('cron' , __FILE__, 'twitter_cron');
|
Hook::register('cron' , __FILE__, 'twitter_cron');
|
||||||
Addon::registerHook('queue_predeliver' , __FILE__, 'twitter_queue_hook');
|
Hook::register('queue_predeliver' , __FILE__, 'twitter_queue_hook');
|
||||||
Addon::registerHook('follow' , __FILE__, 'twitter_follow');
|
Hook::register('follow' , __FILE__, 'twitter_follow');
|
||||||
Addon::registerHook('expire' , __FILE__, 'twitter_expire');
|
Hook::register('expire' , __FILE__, 'twitter_expire');
|
||||||
Addon::registerHook('prepare_body' , __FILE__, 'twitter_prepare_body');
|
Hook::register('prepare_body' , __FILE__, 'twitter_prepare_body');
|
||||||
Addon::registerHook('check_item_notification', __FILE__, 'twitter_check_item_notification');
|
Hook::register('check_item_notification', __FILE__, 'twitter_check_item_notification');
|
||||||
Logger::log("installed twitter");
|
Logger::log("installed twitter");
|
||||||
}
|
}
|
||||||
|
|
||||||
function twitter_uninstall()
|
function twitter_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('load_config' , __FILE__, 'twitter_load_config');
|
Hook::unregister('load_config' , __FILE__, 'twitter_load_config');
|
||||||
Addon::unregisterHook('connector_settings' , __FILE__, 'twitter_settings');
|
Hook::unregister('connector_settings' , __FILE__, 'twitter_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', __FILE__, 'twitter_settings_post');
|
Hook::unregister('connector_settings_post', __FILE__, 'twitter_settings_post');
|
||||||
Addon::unregisterHook('hook_fork' , __FILE__, 'twitter_hook_fork');
|
Hook::unregister('hook_fork' , __FILE__, 'twitter_hook_fork');
|
||||||
Addon::unregisterHook('post_local' , __FILE__, 'twitter_post_local');
|
Hook::unregister('post_local' , __FILE__, 'twitter_post_local');
|
||||||
Addon::unregisterHook('notifier_normal' , __FILE__, 'twitter_post_hook');
|
Hook::unregister('notifier_normal' , __FILE__, 'twitter_post_hook');
|
||||||
Addon::unregisterHook('jot_networks' , __FILE__, 'twitter_jot_nets');
|
Hook::unregister('jot_networks' , __FILE__, 'twitter_jot_nets');
|
||||||
Addon::unregisterHook('cron' , __FILE__, 'twitter_cron');
|
Hook::unregister('cron' , __FILE__, 'twitter_cron');
|
||||||
Addon::unregisterHook('queue_predeliver' , __FILE__, 'twitter_queue_hook');
|
Hook::unregister('queue_predeliver' , __FILE__, 'twitter_queue_hook');
|
||||||
Addon::unregisterHook('follow' , __FILE__, 'twitter_follow');
|
Hook::unregister('follow' , __FILE__, 'twitter_follow');
|
||||||
Addon::unregisterHook('expire' , __FILE__, 'twitter_expire');
|
Hook::unregister('expire' , __FILE__, 'twitter_expire');
|
||||||
Addon::unregisterHook('prepare_body' , __FILE__, 'twitter_prepare_body');
|
Hook::unregister('prepare_body' , __FILE__, 'twitter_prepare_body');
|
||||||
Addon::unregisterHook('check_item_notification', __FILE__, 'twitter_check_item_notification');
|
Hook::unregister('check_item_notification', __FILE__, 'twitter_check_item_notification');
|
||||||
|
|
||||||
// old setting - remove only
|
// old setting - remove only
|
||||||
Addon::unregisterHook('post_local_end' , __FILE__, 'twitter_post_hook');
|
Hook::unregister('post_local_end' , __FILE__, 'twitter_post_hook');
|
||||||
Addon::unregisterHook('addon_settings' , __FILE__, 'twitter_settings');
|
Hook::unregister('addon_settings' , __FILE__, 'twitter_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', __FILE__, 'twitter_settings_post');
|
Hook::unregister('addon_settings_post', __FILE__, 'twitter_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function twitter_load_config(App $a)
|
function twitter_load_config(App $a)
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
|
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Content\Smilies;
|
use Friendica\Content\Smilies;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
|
|
||||||
function unicode_smilies_install() {
|
function unicode_smilies_install() {
|
||||||
Addon::registerHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
|
Hook::register('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
function unicode_smilies_uninstall() {
|
function unicode_smilies_uninstall() {
|
||||||
Addon::unregisterHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
|
Hook::unregister('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
|
||||||
}
|
}
|
||||||
|
|
||||||
function unicode_smilies_smilies(&$a,&$b) {
|
function unicode_smilies_smilies(&$a,&$b) {
|
||||||
|
|
|
@ -6,20 +6,20 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
function viewsrc_install() {
|
function viewsrc_install() {
|
||||||
Addon::registerHook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
|
Hook::register('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
|
||||||
Addon::registerHook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
|
Hook::register('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function viewsrc_uninstall() {
|
function viewsrc_uninstall() {
|
||||||
Addon::unregisterHook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
|
Hook::unregister('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
|
||||||
Addon::unregisterHook('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
|
Hook::unregister('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,18 +6,18 @@
|
||||||
* Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
|
* Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
|
||||||
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
|
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
function webrtc_install() {
|
function webrtc_install() {
|
||||||
Addon::registerHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
|
Hook::register('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
function webrtc_uninstall() {
|
function webrtc_uninstall() {
|
||||||
Addon::unregisterHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
|
Hook::unregister('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Status: Unsupported
|
* Status: Unsupported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -15,14 +15,14 @@ use Friendica\Core\Renderer;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
function widgets_install() {
|
function widgets_install() {
|
||||||
Addon::registerHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
|
Hook::register('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
|
Hook::register('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
|
||||||
Logger::log("installed widgets");
|
Logger::log("installed widgets");
|
||||||
}
|
}
|
||||||
|
|
||||||
function widgets_uninstall() {
|
function widgets_uninstall() {
|
||||||
Addon::unregisterHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
|
Hook::unregister('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function widgets_settings_post(){
|
function widgets_settings_post(){
|
||||||
|
@ -89,7 +89,7 @@ function _randomAlphaNum($length){
|
||||||
function widgets_content(&$a) {
|
function widgets_content(&$a) {
|
||||||
|
|
||||||
if (!isset($_GET['k'])) {
|
if (!isset($_GET['k'])) {
|
||||||
if($a->argv[2]=="cb"){header('HTTP/1.0 400 Bad Request'); killme();}
|
if($a->argv[2]=="cb"){header('HTTP/1.0 400 Bad Request'); exit();}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ function widgets_content(&$a) {
|
||||||
DBA::escape($_GET['k'])
|
DBA::escape($_GET['k'])
|
||||||
);
|
);
|
||||||
if (!count($r)){
|
if (!count($r)){
|
||||||
if($a->argv[2]=="cb"){header('HTTP/1.0 400 Bad Request'); killme();}
|
if($a->argv[2]=="cb"){header('HTTP/1.0 400 Bad Request'); exit();}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$conf = [];
|
$conf = [];
|
||||||
|
@ -110,7 +110,7 @@ function widgets_content(&$a) {
|
||||||
if (file_exists($widgetfile)){
|
if (file_exists($widgetfile)){
|
||||||
require_once($widgetfile);
|
require_once($widgetfile);
|
||||||
} else {
|
} else {
|
||||||
if($a->argv[2]=="cb"){header('HTTP/1.0 400 Bad Request'); killme();}
|
if($a->argv[2]=="cb"){header('HTTP/1.0 400 Bad Request'); exit();}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,5 +176,5 @@ function widgets_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $o;
|
echo $o;
|
||||||
killme();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Authentication;
|
use Friendica\Core\Authentication;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -44,15 +44,15 @@ function windowsphonepush_install()
|
||||||
* The first is within cron - so the push notifications will be
|
* The first is within cron - so the push notifications will be
|
||||||
* sent every 10 minutes (or whatever is set in crontab).
|
* sent every 10 minutes (or whatever is set in crontab).
|
||||||
*/
|
*/
|
||||||
Addon::registerHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
|
Hook::register('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
|
||||||
|
|
||||||
/* Then we'll attach into the addon settings page, and also the
|
/* Then we'll attach into the addon settings page, and also the
|
||||||
* settings post hook so that we can create and update
|
* settings post hook so that we can create and update
|
||||||
* user preferences. User shall be able to activate the addon and
|
* user preferences. User shall be able to activate the addon and
|
||||||
* define whether he allows pushing first characters of item text
|
* define whether he allows pushing first characters of item text
|
||||||
*/
|
*/
|
||||||
Addon::registerHook('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
|
Hook::register('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
|
Hook::register('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
|
||||||
|
|
||||||
Logger::log("installed windowsphonepush");
|
Logger::log("installed windowsphonepush");
|
||||||
}
|
}
|
||||||
|
@ -62,9 +62,9 @@ function windowsphonepush_uninstall()
|
||||||
/* uninstall unregisters any hooks created with register_hook
|
/* uninstall unregisters any hooks created with register_hook
|
||||||
* during install. Don't delete data in table `pconfig`.
|
* during install. Don't delete data in table `pconfig`.
|
||||||
*/
|
*/
|
||||||
Addon::unregisterHook('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
|
Hook::unregister('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
|
Hook::unregister('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
|
||||||
|
|
||||||
Logger::log("removed windowsphonepush");
|
Logger::log("removed windowsphonepush");
|
||||||
}
|
}
|
||||||
|
@ -338,19 +338,19 @@ function windowsphonepush_content(App $a)
|
||||||
switch ($path2) {
|
switch ($path2) {
|
||||||
case "show_settings":
|
case "show_settings":
|
||||||
windowsphonepush_showsettings($a);
|
windowsphonepush_showsettings($a);
|
||||||
killme();
|
exit();
|
||||||
break;
|
break;
|
||||||
case "update_settings":
|
case "update_settings":
|
||||||
$ret = windowsphonepush_updatesettings($a);
|
$ret = windowsphonepush_updatesettings($a);
|
||||||
header("Content-Type: application/json; charset=utf-8");
|
header("Content-Type: application/json; charset=utf-8");
|
||||||
echo json_encode(['status' => $ret]);
|
echo json_encode(['status' => $ret]);
|
||||||
killme();
|
exit();
|
||||||
break;
|
break;
|
||||||
case "update_counterunseen":
|
case "update_counterunseen":
|
||||||
$ret = windowsphonepush_updatecounterunseen();
|
$ret = windowsphonepush_updatecounterunseen();
|
||||||
header("Content-Type: application/json; charset=utf-8");
|
header("Content-Type: application/json; charset=utf-8");
|
||||||
echo json_encode(['status' => $ret]);
|
echo json_encode(['status' => $ret]);
|
||||||
killme();
|
exit();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
echo "Fehler";
|
echo "Fehler";
|
||||||
|
@ -475,5 +475,5 @@ function windowsphonepush_login(App $a)
|
||||||
|
|
||||||
Authentication::setAuthenticatedSessionForUser($record);
|
Authentication::setAuthenticatedSessionForUser($record);
|
||||||
$_SESSION["allow_api"] = true;
|
$_SESSION["allow_api"] = true;
|
||||||
Addon::callHooks('logged_in', $a->user);
|
Hook::callAll('logged_in', $a->user);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,9 @@
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
|
@ -20,27 +19,27 @@ use Friendica\Util\XML;
|
||||||
|
|
||||||
function wppost_install()
|
function wppost_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('hook_fork', 'addon/wppost/wppost.php', 'wppost_hook_fork');
|
Hook::register('hook_fork', 'addon/wppost/wppost.php', 'wppost_hook_fork');
|
||||||
Addon::registerHook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
|
Hook::register('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
|
||||||
Addon::registerHook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
|
Hook::register('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
|
||||||
Addon::registerHook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
|
Hook::register('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
|
||||||
Addon::registerHook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
|
Hook::register('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
|
||||||
Addon::registerHook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
|
Hook::register('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
function wppost_uninstall()
|
function wppost_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('hook_fork', 'addon/wppost/wppost.php', 'wppost_hook_fork');
|
Hook::unregister('hook_fork', 'addon/wppost/wppost.php', 'wppost_hook_fork');
|
||||||
Addon::unregisterHook('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
|
Hook::unregister('post_local', 'addon/wppost/wppost.php', 'wppost_post_local');
|
||||||
Addon::unregisterHook('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
|
Hook::unregister('notifier_normal', 'addon/wppost/wppost.php', 'wppost_send');
|
||||||
Addon::unregisterHook('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
|
Hook::unregister('jot_networks', 'addon/wppost/wppost.php', 'wppost_jot_nets');
|
||||||
Addon::unregisterHook('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
|
Hook::unregister('connector_settings', 'addon/wppost/wppost.php', 'wppost_settings');
|
||||||
Addon::unregisterHook('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
|
Hook::unregister('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
|
||||||
|
|
||||||
// obsolete - remove
|
// obsolete - remove
|
||||||
Addon::unregisterHook('post_local_end', 'addon/wppost/wppost.php', 'wppost_send');
|
Hook::unregister('post_local_end', 'addon/wppost/wppost.php', 'wppost_send');
|
||||||
Addon::unregisterHook('addon_settings', 'addon/wppost/wppost.php', 'wppost_settings');
|
Hook::unregister('addon_settings', 'addon/wppost/wppost.php', 'wppost_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -16,18 +16,18 @@ use Friendica\Util\Strings;
|
||||||
|
|
||||||
function xmpp_install()
|
function xmpp_install()
|
||||||
{
|
{
|
||||||
Addon::registerHook('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
|
Hook::register('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
|
||||||
Addon::registerHook('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
|
Hook::register('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
|
||||||
Addon::registerHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
|
Hook::register('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
|
||||||
Addon::registerHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
|
Hook::register('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
|
||||||
}
|
}
|
||||||
|
|
||||||
function xmpp_uninstall()
|
function xmpp_uninstall()
|
||||||
{
|
{
|
||||||
Addon::unregisterHook('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
|
Hook::unregister('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
|
||||||
Addon::unregisterHook('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
|
Hook::unregister('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
|
||||||
Addon::unregisterHook('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
|
Hook::unregister('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
|
||||||
Addon::unregisterHook('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
|
Hook::unregister('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
|
||||||
}
|
}
|
||||||
|
|
||||||
function xmpp_addon_settings_post()
|
function xmpp_addon_settings_post()
|
||||||
|
|
Loading…
Reference in a new issue