mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 17:08:48 +00:00
Replace deprecated Addon::*registerHook by Hook::*register
This commit is contained in:
parent
eaeb834819
commit
c27b1cb66f
82 changed files with 625 additions and 630 deletions
|
@ -14,24 +14,24 @@
|
|||
* Module Author: Chris Case
|
||||
*
|
||||
*/
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Logger;
|
||||
|
||||
function js_upload_install() {
|
||||
Addon::registerHook('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');
|
||||
Addon::registerHook('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_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
|
||||
Hook::register('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
|
||||
Hook::register('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
|
||||
Hook::register('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
|
||||
}
|
||||
|
||||
|
||||
function js_upload_uninstall() {
|
||||
Addon::unregisterHook('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');
|
||||
Addon::unregisterHook('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_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
|
||||
Hook::unregister('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
|
||||
Hook::unregister('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
|
||||
Hook::unregister('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue