diff --git a/CHANGELOG.md b/CHANGELOG.md
index 352dd81..0f8f27f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,13 @@
CHANGELOG
==========================
+## 2.0.16 (`2001670`)
+
+- **Change:** Change permission names to be consistent with that of XenForo itself (#94)
+- **Change:** When inline editing post, form row is not using full width (#96)
+- **Change:** Switch to native HTML controls on both XF 2.2 and 2.3 (#97)
+- **Fix:** `\[E_DEPRECATED\]` Use of "parent" in callables is deprecated (#95)
+
## 2.0.15 (`2001570`)
- **Fix:** Slow upgrade query causes timeouts on large boards (#92)
diff --git a/ControllerPlugin/Content.php b/ControllerPlugin/Content.php
index 9c7e66a..1fbe404 100644
--- a/ControllerPlugin/Content.php
+++ b/ControllerPlugin/Content.php
@@ -89,6 +89,7 @@ public function extendContentEditAction(AbstractReply $reply, string $contentPar
{
$handler = $content->getChangeOwnerHandler(true);
$reply->setParam('changeOwnerHandler', $handler);
+ $reply->setParam('tckCCO_fullWidth', $this->filter('_xfWithData', 'bool'));
}
}
}
@@ -163,11 +164,17 @@ protected function setNewOwnerDateTimeAndInterval(AbstractService $service, Cont
$changeTime = $this->filter('change_time', 'bool');
if ($changeTime)
{
- $service->setNewTime($filterArray('new_time', [
- 'hour' => 'int',
- 'minute' => 'int',
- 'second' => 'int'
- ]));
+ $newTimeArr = ['hour' => null, 'minute' => null, 'second' => null]; // fallback
+ $newTimeStr = $this->filter('new_time', 'str');
+ if (substr_count($newTimeStr, ':') === 2)
+ {
+ [$hour, $minute, $second] = explode(':', $newTimeStr);
+ $newTimeArr['hour'] = (int) $hour;
+ $newTimeArr['minute'] = (int) $minute;
+ $newTimeArr['second'] = (int) $second;
+ }
+
+ $service->setNewTime($newTimeArr);
}
$applyTimeInterval = $this->filter('apply_time_interval', 'bool');
diff --git a/InlineMod/AbstractOwnerChangerAction.php b/InlineMod/AbstractOwnerChangerAction.php
index 4b26b3d..9f009ad 100644
--- a/InlineMod/AbstractOwnerChangerAction.php
+++ b/InlineMod/AbstractOwnerChangerAction.php
@@ -223,11 +223,17 @@ public function getFormOptions(AbstractCollection $entities, Request $request) :
'day' => null
];
}
- $options['new_time'] = $filterArray('new_time', [
- 'hour' => 'int',
- 'minute' => 'int',
- 'second' => 'int'
- ]);
+
+ $options['new_time'] = ['hour' => null, 'minute' => null, 'second' => null]; // fallback
+ $newTimeStr = $request->filter('new_time', 'str');
+ if (substr_count($newTimeStr, ':') === 2)
+ {
+ [$hour, $minute, $second] = explode(':', $newTimeStr);
+ $options['new_time']['hour'] = (int) $hour;
+ $options['new_time']['minute'] = (int) $minute;
+ $options['new_time']['second'] = (int) $second;
+ }
+
$options['time_interval'] = $filterArray('time_interval', [
'hour' => 'int',
'minute' => 'int',
diff --git a/LICENSE.md b/LICENSE.md
index d183806..77cb920 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2018-2022 TickTackk
+Copyright (c) 2018-2024 TickTackk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index ef3d5c0..ae81562 100644
--- a/README.md
+++ b/README.md
@@ -23,34 +23,34 @@ Options
Permissions
-----------
-#### XFMG: Album moderator permissions
+#### Forum moderator permissions
-- Can change album owner
-- Can change album date
+- Change thread owner
+- Change thread date
+- Change post owner
+- Change post date
#### Profile post moderator permissions
-- Can change profile post owner
-- Can change profile post date
-- Can change profile post comment owner
-- Can change profile post comment date
+- Change profile post owner
+- Change profile post date
+- Change profile post comment owner
+- Change profile post comment date
#### XFMG: Media moderator permissions
-- Can change media owner
-- Can change media date
+- Change media owner
+- Change media date
-#### XFMG: Comment moderator permissions
+#### XFMG: Album moderator permissions
-- Can change comment owner
-- Can change comment date
+- Change album owner
+- Change album date
-#### Forum moderator permissions
+#### XFMG: Comment moderator permissions
-- Can change thread owner
-- Can change thread date
-- Can change post owner
-- Can change post date
+- Change comment owner
+- Change comment date
License
-------
diff --git a/Setup.php b/Setup.php
index a8a5ed8..1bc37f3 100644
--- a/Setup.php
+++ b/Setup.php
@@ -748,9 +748,9 @@ protected function jobManager() : JobManager
*/
protected function app() : BaseApp
{
- if (!\is_callable('parent::app'))
+ if (method_exists(get_parent_class($this), 'app'))
{
- return $this->app;
+ return parent::app();
}
return parent::app();
diff --git a/_dev/resource_description.html b/_dev/resource_description.html
index f283842..4d47003 100644
--- a/_dev/resource_description.html
+++ b/_dev/resource_description.html
@@ -1,2 +1,2 @@
-
Change Content Owner or Date for XenForo 2.0.10+
Description
This add-on allows you to change the owner of content or the timestamp content.
Requirements
PHP 7.1.0+
Options
Change content owner
Name
Description
Default time interval
Permissions
XFMG: Album moderator permissions
Can change album owner
Can change album date
Profile post moderator permissions
Can change profile post owner
Can change profile post date
Can change profile post comment owner
Can change profile post comment date
XFMG: Media moderator permissions
Can change media owner
Can change media date
XFMG: Comment moderator permissions
Can change comment owner
Can change comment date
Forum moderator permissions
Can change thread owner
Can change thread date
Can change post owner
Can change post date
License
+
Change Content Owner or Date for XenForo 2.0.10+
Description
This add-on allows you to change the owner of content or the timestamp content.
Requirements
PHP 7.1.0+
Options
Change content owner
Name
Description
Default time interval
Permissions
Forum moderator permissions
Change thread owner
Change thread date
Change post owner
Change post date
Profile post moderator permissions
Change profile post owner
Change profile post date
Change profile post comment owner
Change profile post comment date
XFMG: Media moderator permissions
Change media owner
Change media date
XFMG: Album moderator permissions
Change album owner
Change album date
XFMG: Comment moderator permissions
Change comment owner
Change comment date
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
\ No newline at end of file
diff --git a/_dev/resource_description.txt b/_dev/resource_description.txt
index c74f621..28a611e 100644
--- a/_dev/resource_description.txt
+++ b/_dev/resource_description.txt
@@ -1,50 +1,49 @@
-[HEADING=1]Change Content Owner or Date for XenForo 2.0.10+[/HEADING]
-[HEADING=1]Description[/HEADING]
+[H1]Change Content Owner or Date for XenForo 2.0.10+[/H1]
+[H2]Description[/H2]
This add-on allows you to change the owner of content or the timestamp content.
-[HEADING=1]Requirements[/HEADING]
+[H2]Requirements[/H2]
[LIST]
[*]PHP 7.1.0+
[/LIST]
-[HEADING=1]Options[/HEADING]
-[HEADING=3]Change content owner[/HEADING]
-[TABLE]
+[H2]Options[/H2]
+[H4]Change content owner[/H4]
+[TABLE width="100%"]
[TR]
-[TH]Name[/TH]
-[TH]Description[/TH]
+[th]Name[/th][th]Description[/th]
[/TR]
[TR]
-[TD]Default time interval[/TD]
+[td]Default time interval[/td]
[/TR]
[/TABLE]
-[HEADING=1]Permissions[/HEADING]
-[HEADING=3]XFMG: Album moderator permissions[/HEADING]
+[H2]Permissions[/H2]
+[H4]Forum moderator permissions[/H4]
[LIST]
-[*]Can change album owner
-[*]Can change album date
+[*]Change thread owner
+[*]Change thread date
+[*]Change post owner
+[*]Change post date
[/LIST]
-[HEADING=3]Profile post moderator permissions[/HEADING]
+[H4]Profile post moderator permissions[/H4]
[LIST]
-[*]Can change profile post owner
-[*]Can change profile post date
-[*]Can change profile post comment owner
-[*]Can change profile post comment date
+[*]Change profile post owner
+[*]Change profile post date
+[*]Change profile post comment owner
+[*]Change profile post comment date
[/LIST]
-[HEADING=3]XFMG: Media moderator permissions[/HEADING]
+[H4]XFMG: Media moderator permissions[/H4]
[LIST]
-[*]Can change media owner
-[*]Can change media date
+[*]Change media owner
+[*]Change media date
[/LIST]
-[HEADING=3]XFMG: Comment moderator permissions[/HEADING]
+[H4]XFMG: Album moderator permissions[/H4]
[LIST]
-[*]Can change comment owner
-[*]Can change comment date
+[*]Change album owner
+[*]Change album date
[/LIST]
-[HEADING=3]Forum moderator permissions[/HEADING]
+[H4]XFMG: Comment moderator permissions[/H4]
[LIST]
-[*]Can change thread owner
-[*]Can change thread date
-[*]Can change post owner
-[*]Can change post date
+[*]Change comment owner
+[*]Change comment date
[/LIST]
-[HEADING=1]License[/HEADING]
+[H2]License[/H2]
This project is licensed under the MIT License - see the [URL='https://github.com/ticktackk/ChangeContentOwnerForXF2/blob/master/LICENSE.md']LICENSE.md[/URL] file for details.
\ No newline at end of file
diff --git a/_output/extension_hint.php b/_output/extension_hint.php
index d25c967..6c7dbc6 100644
--- a/_output/extension_hint.php
+++ b/_output/extension_hint.php
@@ -1,5 +1,6 @@
.*?<\\/xf:if>#si",
- "replace": "$0\n\n"
+ "replace": "$0\n\n"
}
\ No newline at end of file
diff --git a/_output/template_modifications/public/tckChangeContentOwner_profile_post_comment_edit.json b/_output/template_modifications/public/tckChangeContentOwner_profile_post_comment_edit.json
index 41cce62..07da345 100644
--- a/_output/template_modifications/public/tckChangeContentOwner_profile_post_comment_edit.json
+++ b/_output/template_modifications/public/tckChangeContentOwner_profile_post_comment_edit.json
@@ -5,5 +5,5 @@
"enabled": true,
"action": "preg_replace",
"find": "#.*?<\\/xf:if>#si",
- "replace": "$0\n\n"
+ "replace": "$0\n\n"
}
\ No newline at end of file
diff --git a/_output/template_modifications/public/tckChangeContentOwner_profile_post_edit.json b/_output/template_modifications/public/tckChangeContentOwner_profile_post_edit.json
index 32026f1..4566a24 100644
--- a/_output/template_modifications/public/tckChangeContentOwner_profile_post_edit.json
+++ b/_output/template_modifications/public/tckChangeContentOwner_profile_post_edit.json
@@ -5,5 +5,5 @@
"enabled": true,
"action": "preg_replace",
"find": "#.*?<\\/xf:if>#si",
- "replace": "$0\n\n"
+ "replace": "$0\n\n"
}
\ No newline at end of file
diff --git a/_output/template_modifications/public/tckChangeContentOwner_thread_edit.json b/_output/template_modifications/public/tckChangeContentOwner_thread_edit.json
index 8ca9269..354563f 100644
--- a/_output/template_modifications/public/tckChangeContentOwner_thread_edit.json
+++ b/_output/template_modifications/public/tckChangeContentOwner_thread_edit.json
@@ -5,5 +5,5 @@
"enabled": true,
"action": "preg_replace",
"find": "##si",
- "replace": "$0\n\n"
+ "replace": "$0\n\n"
}
\ No newline at end of file
diff --git a/_output/template_modifications/public/tckChangeContentOwner_xfmg_album_edit.json b/_output/template_modifications/public/tckChangeContentOwner_xfmg_album_edit.json
index 2437bf3..e28ff11 100644
--- a/_output/template_modifications/public/tckChangeContentOwner_xfmg_album_edit.json
+++ b/_output/template_modifications/public/tckChangeContentOwner_xfmg_album_edit.json
@@ -5,5 +5,5 @@
"enabled": true,
"action": "preg_replace",
"find": "#.*?<\\/xf:if>#si",
- "replace": "$0\n\n"
+ "replace": "$0\n\n"
}
\ No newline at end of file
diff --git a/_output/template_modifications/public/tckChangeContentOwner_xfmg_comment_edit.json b/_output/template_modifications/public/tckChangeContentOwner_xfmg_comment_edit.json
index 15bb12c..404d5fc 100644
--- a/_output/template_modifications/public/tckChangeContentOwner_xfmg_comment_edit.json
+++ b/_output/template_modifications/public/tckChangeContentOwner_xfmg_comment_edit.json
@@ -5,5 +5,5 @@
"enabled": true,
"action": "preg_replace",
"find": "#.*?<\\/xf:if>#si",
- "replace": "$0\n\n"
+ "replace": "$0\n\n"
}
\ No newline at end of file
diff --git a/_output/template_modifications/public/tckChangeContentOwner_xfmg_media_edit.json b/_output/template_modifications/public/tckChangeContentOwner_xfmg_media_edit.json
index 8bb8f64..e332cd1 100644
--- a/_output/template_modifications/public/tckChangeContentOwner_xfmg_media_edit.json
+++ b/_output/template_modifications/public/tckChangeContentOwner_xfmg_media_edit.json
@@ -5,5 +5,5 @@
"enabled": true,
"action": "preg_replace",
"find": "#.*?<\\/xf:if>#si",
- "replace": "$0\n\n"
+ "replace": "$0\n\n"
}
\ No newline at end of file
diff --git a/_output/templates/public/tckChangeContentOwner_macros.html b/_output/templates/public/tckChangeContentOwner_macros.html
index 118e9e6..3803f6f 100644
--- a/_output/templates/public/tckChangeContentOwner_macros.html
+++ b/_output/templates/public/tckChangeContentOwner_macros.html
@@ -37,186 +37,33 @@
-
-
+
-
-
+
+
+
+
+
+
-
+
-