aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-11-08 22:02:08 +0100
committerLaria Carolin Chabowski <laria@laria.me>2020-11-08 22:02:08 +0100
commit71b5df2ea7d81fa98e1e5577233a411195ea47bc (patch)
treeee86f41755931bd1d1bc15de4d43c15fd703ef83
parent504ab16840006be42ff1254ef58e26d8ed88e077 (diff)
downloadr7r-atom-feed-71b5df2ea7d81fa98e1e5577233a411195ea47bc.tar.gz
r7r-atom-feed-71b5df2ea7d81fa98e1e5577233a411195ea47bc.tar.bz2
r7r-atom-feed-71b5df2ea7d81fa98e1e5577233a411195ea47bc.zip
Replace intcmp() call with <=>
-rwxr-xr-xbuild.sh4
-rw-r--r--plugin.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index 296072f..188eeea 100755
--- a/build.sh
+++ b/build.sh
@@ -8,8 +8,8 @@ r7r-plugin-packer \
--classname=atom_feed \
--pluginname=atom_feed \
--author='Laria Carolin Chabowski <laria@laria.me>' \
- --versiontext="0.5.1" \
- --versioncount=4 \
+ --versiontext="0.5.2" \
+ --versioncount=5 \
--api=5 \
--shortdesc="Power up your website with some Atom Feeds!" \
--helpfile=help.html \
diff --git a/plugin.php b/plugin.php
index a487f65..48bbf67 100644
--- a/plugin.php
+++ b/plugin.php
@@ -143,7 +143,7 @@ class atom_feed extends RatatoeskrPlugin
if(!isset($article->title[$lang]))
throw new NotFoundError();
$comments = $article->get_comments($lang, True);
- usort($comments, function($a, $b) { return intcmp($a->get_timestamp(), $b->get_timestamp()); });
+ usort($comments, function($a, $b) { return $a->get_timestamp() <=> $b->get_timestamp(); });
$this->ste->vars["feed"]["title"] = "Comments for " . $article->title[$lang]->text . " - " . $this->config["title"];
$this->ste->vars["feed"]["alternate"] = "$baseurl/$lang/" . $article->urlname;