]> git.mxchange.org Git - friendica-addons.git/blobdiff - webrtc/webrtc.php
Issue 3873
[friendica-addons.git] / webrtc / webrtc.php
index 7a4e8cf772cd0b2fae2a9c9a3f295de3f87030f3..4ea17f471423dc6e25300862447735e8a3cade6e 100644 (file)
@@ -3,10 +3,12 @@
  * Name: WebRTC Application
  * Description: add a webrtc instance for video/audio
  * Version: 1.0
- * Author: stephen mahood <https://friends.mayfirst.org/profile/marxistvegan>
- * Author: Tobias Diekershoff <http://diekershoff.homeunix.net/friendica/profile/tobias>
+ * Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
+ * 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');
 }
@@ -23,13 +25,13 @@ function webrtc_app_menu($a,&$b) {
 function webrtc_plugin_admin (&$a, &$o) {
         $t = get_markup_template( "admin.tpl", "addon/webrtc/" );
        $o = replace_macros( $t, array(
-           '$submit' => t('Submit'),
-           '$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 .')),
+           '$submit' => t('Save Settings'),
+           '$webrtcurl' => array('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 .')),
        ));
 }
 function webrtc_plugin_admin_post (&$a) {
         $url = ((x($_POST, 'webrtcurl')) ? notags(trim($_POST['webrtcurl'])) : '');
-           set_config('webrtc', 'webrtcurl', $url);
+           Config::set('webrtc', 'webrtcurl', $url);
            info( t('Settings updated.'). EOL);
 }
 
@@ -41,7 +43,7 @@ function webrtc_content(&$a) {
         $o = '';
 
         /* landingpage to create chatrooms */
-        $webrtcurl = get_config('webrtc','webrtcurl');
+        $webrtcurl = Config::get('webrtc','webrtcurl');
 
         /* embedd the landing page in an iframe */
         $o .= '<h2>'.t('Video Chat').'</h2>';