]> git.mxchange.org Git - friendica-addons.git/blobdiff - widgets/widgets.php
Merge branch 'master' of https://github.com/friendica/friendica-addons
[friendica-addons.git] / widgets / widgets.php
index 27cabfd698cdec6580ee39d9c99b2ff0d8699fbd..72534ce3bb75863556051ffbbbe91c13738eacc0 100755 (executable)
@@ -19,7 +19,8 @@ function widgets_uninstall() {
 
 
 function widgets_settings_post(){
-       
+       if(! local_user())
+               return;
        if (isset($_POST['widgets-submit'])){
                del_pconfig(local_user(), 'widgets', 'key');
                
@@ -50,7 +51,8 @@ function widgets_settings(&$a,&$o) {
 
        
        
-       $t = file_get_contents( dirname(__file__). "/settings.tpl" );
+#      $t = file_get_contents( dirname(__file__). "/settings.tpl" );
+       $t = get_markup_template("settings.tpl", "addon/widgets/");
        $o .= replace_macros($t, array(
                '$submit' => t('Generate new key'),
                '$baseurl' => $a->get_baseurl(),