From 376ae23982e11b97156fdf70a4efec24a782c2ae Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Wed, 15 Apr 2020 22:24:19 +0200 Subject: Fix whitespace --- plugin.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'plugin.php') diff --git a/plugin.php b/plugin.php index d0a044f..96afab1 100644 --- a/plugin.php +++ b/plugin.php @@ -6,16 +6,16 @@ class kch42_gravatar extends RatatoeskrPlugin { if(!isset($params["comment"])) throw new \ste\RuntimeError("ste:kch42_gravatar needs the comment parameter."); - + $ste_comment = $ste->get_var_by_name($params["comment"]); - + if(isset($ste_comment["__obj"])) $comment = $ste_comment["__obj"]; else $comment = Comment::by_id($ste_comment["id"]); - + $mail_hash = md5(strtolower(trim($comment->author_mail))); - + $gravatar_args = array("default" => "identicon", "rating" => "g", "size" => "80"); $query_fragments = array(); foreach($gravatar_args as $key => &$value) @@ -25,18 +25,16 @@ class kch42_gravatar extends RatatoeskrPlugin $value = htmlspecialchars(urlencode($value)); $query_fragments[] = "$key=$value"; } - + $styles = "width: {$gravatar_args["size"]}px; height: {$gravatar_args["size"]}px;" . (isset($params["style"]) ? " " . $params["style"] : ""); - + $protocol = ((!empty($_SERVER["HTTPS"])) and ($_SERVER["HTTPS"] == "on")) ? "https" : "http"; - + return "\"\""; } - + public function init() { $this->ste->register_tag("kch42_gravatar", array($this, "ste_tag_kch42_gravatar")); } } - -?> -- cgit v1.2.3-70-g09d2