From 172874dba29b48fc7c2665df222d4ac2effeca5b Mon Sep 17 00:00:00 2001 From: Bruno Saad Date: Mon, 12 Sep 2022 00:38:55 +0000 Subject: [PATCH] avoid changing the "submitted at" value when plugin already exists --- code/bin/update_plugins.php | 4 ++-- code/lib/db/submit.php | 22 ++++------------------ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/code/bin/update_plugins.php b/code/bin/update_plugins.php index 91239f1..f85fdc6 100644 --- a/code/bin/update_plugins.php +++ b/code/bin/update_plugins.php @@ -20,7 +20,7 @@ if ($argv[1]) { // if the user provided a specific github URL to update $githubUrl = $argv[1]; - savePlugin($githubUrl, true); + savePlugin($githubUrl); } else { // else we run for all plugins @@ -33,6 +33,6 @@ $plugins_array = $stmt_plugins->fetchAll(); foreach ($plugins_array as $row_plugins) { - savePlugin($row_plugins['url'], true); + savePlugin($row_plugins['url']); } } diff --git a/code/lib/db/submit.php b/code/lib/db/submit.php index 50dbf12..644b22e 100644 --- a/code/lib/db/submit.php +++ b/code/lib/db/submit.php @@ -1,6 +1,6 @@