]> git.mxchange.org Git - friendica-addons.git/blobdiff - webrtc/webrtc.php
Revert to stable version 3.5.4
[friendica-addons.git] / webrtc / webrtc.php
index 1588847df4bf49e25016627bc3ba2ce09ea92ee0..8b3a243e32e49174dca797c13d0ca843b31d4df6 100644 (file)
@@ -7,8 +7,6 @@
  * Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
  */
 
-use Friendica\Core\Config;
-
 function webrtc_install() {
         register_hook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
 }
@@ -24,14 +22,14 @@ function webrtc_app_menu($a,&$b) {
 
 function webrtc_plugin_admin (&$a, &$o) {
         $t = get_markup_template( "admin.tpl", "addon/webrtc/" );
-       $o = replace_macros( $t, [
+       $o = replace_macros( $t, array(
            '$submit' => t('Save Settings'),
-           '$webrtcurl' => ['webrtcurl', t('WebRTC Base URL'), Config::get('webrtc','webrtcurl' ), t('Page your users will create a WebRTC chat room on. For example you could use https://live.mayfirst.org .')],
-       ]);
+           '$webrtcurl' => array('webrtcurl', t('WebRTC Base URL'), get_config('webrtc','webrtcurl' ), t('Page your users will create a WebRTC chat room on. For example you could use https://live.mayfirst.org .')),
+       ));
 }
 function webrtc_plugin_admin_post (&$a) {
         $url = ((x($_POST, 'webrtcurl')) ? notags(trim($_POST['webrtcurl'])) : '');
-           Config::set('webrtc', 'webrtcurl', $url);
+           set_config('webrtc', 'webrtcurl', $url);
            info( t('Settings updated.'). EOL);
 }
 
@@ -43,7 +41,7 @@ function webrtc_content(&$a) {
         $o = '';
 
         /* landingpage to create chatrooms */
-        $webrtcurl = Config::get('webrtc','webrtcurl');
+        $webrtcurl = get_config('webrtc','webrtcurl');
 
         /* embedd the landing page in an iframe */
         $o .= '<h2>'.t('Video Chat').'</h2>';