Эх сурвалжийг харах

correct Error: "Can't use method return value in write context"
thanks Moises Jafet, kullbocksDE and moijafcor

Fernando Ribeiro 8 жил өмнө
parent
commit
aaea33ee80
1 өөрчлөгдсөн 2 нэмэгдсэн , 4 устгасан
  1. 2 4
      syntax/button.php

+ 2 - 4
syntax/button.php

@@ -129,8 +129,7 @@ class syntax_plugin_socialite_button extends DokuWiki_Syntax_Plugin {
             case 'twitter':
                 $name = 'Twitter';
                 $href = 'https://twitter.com/intent/tweet?url=' . $url . '&text='. $title;
-                $twitter_user = $this->getConf('twitter_user');
-                if (!empty($twitter_user)) { $href .= "&via=" . rawurlencode($twitter_user); }
+                if ($this->getConf('twitter_user')) { $href .= "&via=" . rawurlencode($this->getConf('twitter_user')); }
                 break;
             case 'facebook':
                 $name = 'Facebook';
@@ -163,8 +162,7 @@ class syntax_plugin_socialite_button extends DokuWiki_Syntax_Plugin {
             case 'delicious':
                 $name = 'Delicious';
                 $href = 'https://delicious.com/save?v=5&noui&jump=close&url='. $url .'&title=' . $title;
-                $delicious_provider = $this->getConf('delicious_provider');
-                if (!empty($delicious_provider)) { $href .= "&provider=" . rawurlencode($delicious_provider); }
+                if ($this->getConf('delicious_provider')) { $href .= "&provider=" . rawurlencode($this->getConf('delicious_provider')); }
                 break;
             case 'stumbleupon':
                 $name = 'StumbleUpon';