diff --git a/ext/source_history/main.php b/ext/source_history/main.php
index 037f41a4..d8de6b55 100644
--- a/ext/source_history/main.php
+++ b/ext/source_history/main.php
@@ -250,7 +250,7 @@ class Source_History extends Extension
/**
* This function attempts to revert all changes by a given IP within an (optional) timeframe.
*/
- public function process_revert_all_changes(string $name, string $ip, string $date)
+ public function process_revert_all_changes(?string $name, ?string $ip, ?string $date)
{
global $database;
@@ -268,16 +268,16 @@ class Source_History extends Extension
}
}
- if (!is_null($date)) {
- $select_code[] = 'date_set >= ?';
- $select_args[] = $date;
- }
-
if (!is_null($ip)) {
$select_code[] = 'user_ip = ?';
$select_args[] = $ip;
}
+ if (!is_null($date)) {
+ $select_code[] = 'date_set >= ?';
+ $select_args[] = $date;
+ }
+
if (count($select_code) == 0) {
log_error("source_history", "Tried to mass revert without any conditions");
return;
diff --git a/ext/source_history/theme.php b/ext/source_history/theme.php
index f987c0f2..9d6faeac 100644
--- a/ext/source_history/theme.php
+++ b/ext/source_history/theme.php
@@ -111,16 +111,14 @@ class Source_HistoryTheme extends Themelet
}
$html = '
- Revert source changes/edit by a specific IP address or username.
-
You can restrict the time frame to revert these edits as well.
-
(Date format: 2011-10-23)
+ Revert source changes by a specific IP address or username, optionally limited to recent changes.
'.$validation_msg.'
'.make_form(make_link("source_history/bulk_revert"), 'POST')."
diff --git a/ext/tag_history/main.php b/ext/tag_history/main.php
index ad73f7ad..125c36c7 100644
--- a/ext/tag_history/main.php
+++ b/ext/tag_history/main.php
@@ -247,7 +247,7 @@ class Tag_History extends Extension
/**
* This function attempts to revert all changes by a given IP within an (optional) timeframe.
*/
- public function process_revert_all_changes(string $name, string $ip, string $date)
+ public function process_revert_all_changes(?string $name, ?string $ip, ?string $date)
{
global $database;
@@ -265,16 +265,16 @@ class Tag_History extends Extension
}
}
- if (!is_null($date)) {
- $select_code[] = 'date_set >= ?';
- $select_args[] = $date;
- }
-
if (!is_null($ip)) {
$select_code[] = 'user_ip = ?';
$select_args[] = $ip;
}
+ if (!is_null($date)) {
+ $select_code[] = 'date_set >= ?';
+ $select_args[] = $date;
+ }
+
if (count($select_code) == 0) {
log_error("tag_history", "Tried to mass revert without any conditions");
return;
diff --git a/ext/tag_history/theme.php b/ext/tag_history/theme.php
index 9d48abde..dfa1ab41 100644
--- a/ext/tag_history/theme.php
+++ b/ext/tag_history/theme.php
@@ -123,16 +123,14 @@ class Tag_HistoryTheme extends Themelet
}
$html = '
- Revert tag changes/edit by a specific IP address or username.
-
You can restrict the time frame to revert these edits as well.
-
(Date format: 2011-10-23)
+ Revert tag changes by a specific IP address or username, optionally limited to recent changes.
'.$validation_msg.'
'.make_form(make_link("tag_history/bulk_revert"), 'POST')."