X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js_upload%2Fjs_upload.php;h=83fb275a2a21b12257a16acbe03ea52977377549;hb=a97eeb8e8b4cb831677990f1bbbd43b3d756da05;hp=28903f87e9028e9589b5fd52880c425a34da7748;hpb=6e4abdb875c17ea7c520c3ca65c118c6369086f5;p=friendica-addons.git
diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php
index 28903f87..83fb275a 100644
--- a/js_upload/js_upload.php
+++ b/js_upload/js_upload.php
@@ -14,23 +14,25 @@
* 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');
}
@@ -38,8 +40,8 @@ function js_upload_form(&$a,&$b) {
$b['default_upload'] = false;
- $b['addon_text'] .= '';
- $b['addon_text'] .= '';
+ $b['addon_text'] .= '';
+ $b['addon_text'] .= '';
$upload_msg = L10n::t('Select files for upload');
$drop_msg = L10n::t('Drop files here to upload');
@@ -60,38 +62,38 @@ function js_upload_form(&$a,&$b) {