diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..d4156b0
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,5 @@
+{
+ "require-dev": {
+ "laravel/pint": "^1.13"
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..ee99888
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,85 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "3abf17e8dea3cf16b916da16dfe44569",
+ "packages": [],
+ "packages-dev": [
+ {
+ "name": "laravel/pint",
+ "version": "v1.13.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/laravel/pint.git",
+ "reference": "93b2d0d49719bc6e444ba21cd4dbbccec935413d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/laravel/pint/zipball/93b2d0d49719bc6e444ba21cd4dbbccec935413d",
+ "reference": "93b2d0d49719bc6e444ba21cd4dbbccec935413d",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "ext-tokenizer": "*",
+ "ext-xml": "*",
+ "php": "^8.1.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "^3.34.1",
+ "illuminate/view": "^10.23.1",
+ "laravel-zero/framework": "^10.1.2",
+ "mockery/mockery": "^1.6.6",
+ "nunomaduro/larastan": "^2.6.4",
+ "nunomaduro/termwind": "^1.15.1",
+ "pestphp/pest": "^2.18.2"
+ },
+ "bin": [
+ "builds/pint"
+ ],
+ "type": "project",
+ "autoload": {
+ "psr-4": {
+ "App\\": "app/",
+ "Database\\Seeders\\": "database/seeders/",
+ "Database\\Factories\\": "database/factories/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nuno Maduro",
+ "email": "enunomaduro@gmail.com"
+ }
+ ],
+ "description": "An opinionated code formatter for PHP.",
+ "homepage": "https://laravel.com",
+ "keywords": [
+ "format",
+ "formatter",
+ "lint",
+ "linter",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/laravel/pint/issues",
+ "source": "https://github.com/laravel/pint"
+ },
+ "time": "2023-10-10T15:39:09+00:00"
+ }
+ ],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": [],
+ "plugin-api-version": "2.3.0"
+}
diff --git a/src/data/build.xml b/src/data/build.xml
index 2bb4fc2..2d1803a 100644
--- a/src/data/build.xml
+++ b/src/data/build.xml
@@ -7,6 +7,7 @@
+
diff --git a/src/data/emails.xml b/src/data/emails.xml
index 01c8c81..1c6c7aa 100644
--- a/src/data/emails.xml
+++ b/src/data/emails.xml
@@ -5,10 +5,19 @@
— {setting="board_name"}]]>$message, $report, $email{$message|raw}
{$report|raw}
+-- {setting="board_name"}0dmcanotification_submitted_admin
+A new claim has been submitted.
+
+
+{$report|raw}
+
+— {setting="board_name"}]]>$report, $emailA new claim has been submitted.
+{$report|raw}
+
-- {setting="board_name"}0dmcanotification_filed
-— {setting="board_name"}]]>$message, $email{$message|raw}
+— {setting="board_name"}]]>$message, $report, $email{$message|raw}
-- {setting="board_name"}0dmcadeniedHi {$name},
@@ -64,7 +73,7 @@
-- {setting="board_name"}0dmcanotification_firststrike
-— {setting="board_name"}]]>$message, $email{$message|raw}
+— {setting="board_name"}]]>$message, $report, $email{$message|raw}
-- {setting="board_name"}0dmcanotification_secondstrike0dmcanotification_thirdstrike
-— {setting="board_name"}]]>$message, $email{$message|raw}
+— {setting="board_name"}]]>$message, $report, $email{$message|raw}
-- {setting="board_name"}0dmcanotification_onhold
-
+
DMCA Copyright Claim Manager
DMCA Manager
flag
@@ -13,6 +13,7 @@
Copyright Claims
Receive notifications regarding updates about your filed copyright claims.
Your copyright claim was submitted
+ A copyright claim was submitted
Your copyright claim was approved
Your copyright claim was placed on hold
Your copyright claim was denied
@@ -22,6 +23,7 @@
The copyright claim that was filed against some content you posted was approved. This is your second strike
The copyright claim that was filed against some content you posted was approved. This is your last strike
Your copyright claim was submitted
+ A copyright claim was submitted
Your copyright claim was approved
Your copyright claim was placed on hold
Your copyright claim was denied
@@ -37,6 +39,7 @@
Final Steps
Settings
Claims Management
+ Admin Notifications
Claimant Notifications
Claim Form
Groups
@@ -59,6 +62,8 @@
The warning reason that is applied when a member receives a copyright infringement strike.
Infringing Group
The group the member will be moved to when they receive their third strike. Select none to not move a member.
+ Admin Group
+ Members of the selected group will receive notifications when a claim has been submitted.
Claim Form Intro
Text that will be shown above the claim submission form.
Frequently Asked Questions
@@ -88,8 +93,8 @@
Telephone
Infringing URLs
Post a link of each URL containing the copyrighted material.
- Describe The Original Work
- Describe the copyrighted material in full detail, including links to the original work or evidence of source material.
+ Describe The Original Work
+ Describe the copyrighted material in full detail, including links to the original work or evidence of source material.
I Understand And Agree
By checking this box, you attest, under penalty of perjury, that you have a good faith belief that use of the material in this report is not authorized by the copyright owner, its agent, or the law; AND you are authorized to act on behalf of the copyright owner; AND you understand, under 17 U.S.C. § 512(f), you may be liable for any damages, including costs and attorneys' fees, if you knowingly materially misrepresent reported material.
Digital Signature
diff --git a/src/data/settings.json b/src/data/settings.json
index a30eef9..4e7124d 100755
--- a/src/data/settings.json
+++ b/src/data/settings.json
@@ -15,6 +15,10 @@
"key": "dcma_warning_posting_restriction",
"default": ""
},
+ {
+ "key": "dmca_admin_group",
+ "default": ""
+ },
{
"key": "dmca_approval_email",
"default": ""
diff --git a/src/data/versions.json b/src/data/versions.json
index 8c91e48..745c2a0 100755
--- a/src/data/versions.json
+++ b/src/data/versions.json
@@ -1,5 +1,6 @@
{
"10000": "1.0.0",
"10001": "1.0.1",
- "10002": "1.0.2"
+ "10002": "1.0.2",
+ "10003": "1.0.3"
}
\ No newline at end of file
diff --git a/src/dev/email/notification_submitted_admin.phtml b/src/dev/email/notification_submitted_admin.phtml
new file mode 100644
index 0000000..e1b305d
--- /dev/null
+++ b/src/dev/email/notification_submitted_admin.phtml
@@ -0,0 +1,8 @@
+
+
+A new claim has been submitted.
+
+
+{$report|raw}
+
+— {setting="board_name"}
\ No newline at end of file
diff --git a/src/dev/email/notification_submitted_admin.txt b/src/dev/email/notification_submitted_admin.txt
new file mode 100644
index 0000000..8f25916
--- /dev/null
+++ b/src/dev/email/notification_submitted_admin.txt
@@ -0,0 +1,5 @@
+
+A new claim has been submitted.
+{$report|raw}
+
+-- {setting="board_name"}
\ No newline at end of file
diff --git a/src/dev/lang.php b/src/dev/lang.php
index f008304..15d46b0 100644
--- a/src/dev/lang.php
+++ b/src/dev/lang.php
@@ -19,6 +19,7 @@
'notifications__dmca_Claim_desc' => 'Receive notifications regarding updates about your filed copyright claims.',
'mailsub__dmca_notification_submitted' => 'Your copyright claim was submitted',
+ 'mailsub__dmca_notification_submitted_admin' => 'A copyright claim was submitted',
'mailsub__dmca_notification_approved' => 'Your copyright claim was approved',
'mailsub__dmca_notification_onhold' => 'Your copyright claim was placed on hold',
'mailsub__dmca_notification_denied' => 'Your copyright claim was denied',
@@ -29,6 +30,7 @@
'mailsub__dmca_notification_thirdstrike' => 'The copyright claim that was filed against some content you posted was approved. This is your last strike',
'mailsub__dmca_submitted' => 'Your copyright claim was submitted',
+ 'mailsub__dmca_submitted_admin' => 'A copyright claim was submitted',
'mailsub__dmca_approved' => 'Your copyright claim was approved',
'mailsub__dmca_onhold' => 'Your copyright claim was placed on hold',
'mailsub__dmca_denied' => 'Your copyright claim was denied',
@@ -47,6 +49,7 @@
'dmca_settings' => 'Settings',
'dmca_settings_tab_claims' => 'Claims Management',
+ 'dmca_settings_tab_admin_notifications' => 'Admin Notifications',
'dmca_settings_tab_notifications' => 'Claimant Notifications',
'dmca_settings_tab_form' => 'Claim Form',
'dmca_settings_groups' => 'Groups',
@@ -69,6 +72,8 @@
'dmca_warning_desc' => 'The warning reason that is applied when a member receives a copyright infringement strike.',
'dmca_group' => 'Infringing Group',
'dmca_group_desc' => 'The group the member will be moved to when they receive their third strike. Select none to not move a member.',
+ 'dmca_admin_group' => 'Admin Group',
+ 'dmca_admin_group_desc' => 'Members of the selected group will receive notifications when a claim has been submitted.',
'dmca_claim_intro' => 'Claim Form Intro',
'dmca_claim_intro_desc' => 'Text that will be shown above the claim submission form.',
'dmca_faq' => 'Frequently Asked Questions',
@@ -99,8 +104,8 @@
'phone' => 'Telephone',
'urls' => 'Infringing URLs',
'urls_desc' => 'Post a link of each URL containing the copyrighted material.',
- 'description' => 'Describe The Original Work',
- 'description_desc' => 'Describe the copyrighted material in full detail, including links to the original work or evidence of source material.',
+ 'description_work' => 'Describe The Original Work',
+ 'description_work_desc' => 'Describe the copyrighted material in full detail, including links to the original work or evidence of source material.',
'accept_terms' => 'I Understand And Agree',
'accept_terms_desc' => 'By checking this box, you attest, under penalty of perjury, that you have a good faith belief that use of the material in this report is not authorized by the copyright owner, its agent, or the law; AND you are authorized to act on behalf of the copyright owner; AND you understand, under 17 U.S.C. § 512(f), you may be liable for any damages, including costs and attorneys\' fees, if you knowingly materially misrepresent reported material.',
'signature' => 'Digital Signature',
diff --git a/src/extensions/core/EditorLocations/ApprovalEmail.php b/src/extensions/core/EditorLocations/ApprovalEmail.php
index 0fb898d..75c4e71 100644
--- a/src/extensions/core/EditorLocations/ApprovalEmail.php
+++ b/src/extensions/core/EditorLocations/ApprovalEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/ClaimFiledEmail.php b/src/extensions/core/EditorLocations/ClaimFiledEmail.php
index 55289b3..fbe0c3e 100644
--- a/src/extensions/core/EditorLocations/ClaimFiledEmail.php
+++ b/src/extensions/core/EditorLocations/ClaimFiledEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/ClaimIntro.php b/src/extensions/core/EditorLocations/ClaimIntro.php
index 28c5976..d935bf7 100644
--- a/src/extensions/core/EditorLocations/ClaimIntro.php
+++ b/src/extensions/core/EditorLocations/ClaimIntro.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/DeletedEmail.php b/src/extensions/core/EditorLocations/DeletedEmail.php
index 11b7d0f..d76942c 100644
--- a/src/extensions/core/EditorLocations/DeletedEmail.php
+++ b/src/extensions/core/EditorLocations/DeletedEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/DeniedEmail.php b/src/extensions/core/EditorLocations/DeniedEmail.php
index 5fa01ab..e35be8e 100644
--- a/src/extensions/core/EditorLocations/DeniedEmail.php
+++ b/src/extensions/core/EditorLocations/DeniedEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/Faq.php b/src/extensions/core/EditorLocations/Faq.php
index c697086..02281b3 100644
--- a/src/extensions/core/EditorLocations/Faq.php
+++ b/src/extensions/core/EditorLocations/Faq.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/FinalSteps.php b/src/extensions/core/EditorLocations/FinalSteps.php
index a48a49c..7f105ea 100644
--- a/src/extensions/core/EditorLocations/FinalSteps.php
+++ b/src/extensions/core/EditorLocations/FinalSteps.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/FirstStrikeEmail.php b/src/extensions/core/EditorLocations/FirstStrikeEmail.php
index e7d7d53..4d78d10 100644
--- a/src/extensions/core/EditorLocations/FirstStrikeEmail.php
+++ b/src/extensions/core/EditorLocations/FirstStrikeEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/OnHoldEmail.php b/src/extensions/core/EditorLocations/OnHoldEmail.php
index d01a28d..36b8a0c 100644
--- a/src/extensions/core/EditorLocations/OnHoldEmail.php
+++ b/src/extensions/core/EditorLocations/OnHoldEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/ReportDescription.php b/src/extensions/core/EditorLocations/ReportDescription.php
index 302e49f..783f1ca 100644
--- a/src/extensions/core/EditorLocations/ReportDescription.php
+++ b/src/extensions/core/EditorLocations/ReportDescription.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/SecondStrikeEmail.php b/src/extensions/core/EditorLocations/SecondStrikeEmail.php
index 7c0fb12..e84e4ce 100644
--- a/src/extensions/core/EditorLocations/SecondStrikeEmail.php
+++ b/src/extensions/core/EditorLocations/SecondStrikeEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/SubmittedEmail.php b/src/extensions/core/EditorLocations/SubmittedEmail.php
index dcd8442..3c390b5 100644
--- a/src/extensions/core/EditorLocations/SubmittedEmail.php
+++ b/src/extensions/core/EditorLocations/SubmittedEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/EditorLocations/ThirdStrikeEmail.php b/src/extensions/core/EditorLocations/ThirdStrikeEmail.php
index a51195e..dc3d44b 100644
--- a/src/extensions/core/EditorLocations/ThirdStrikeEmail.php
+++ b/src/extensions/core/EditorLocations/ThirdStrikeEmail.php
@@ -56,7 +56,7 @@ public function canAttach($member, $field)
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
- public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly=false): bool
+ public function attachmentPermissionCheck($member, $id1, $id2, $id3, $attachment, $viewOnly = false): bool
{
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
return true;
diff --git a/src/extensions/core/FrontNavigation/FileAClaim.php b/src/extensions/core/FrontNavigation/FileAClaim.php
index 5f11a5b..18d654d 100644
--- a/src/extensions/core/FrontNavigation/FileAClaim.php
+++ b/src/extensions/core/FrontNavigation/FileAClaim.php
@@ -90,7 +90,7 @@ public function active(): bool
* @param bool $noStore If true, will skip datastore and get from DB (used for ACP preview)
* @return array
*/
- public function children($noStore=false)
+ public function children($noStore = false)
{
return null;
}
diff --git a/src/extensions/core/Notifications/Claim.php b/src/extensions/core/Notifications/Claim.php
index f6a8ad4..9a2723e 100644
--- a/src/extensions/core/Notifications/Claim.php
+++ b/src/extensions/core/Notifications/Claim.php
@@ -33,7 +33,7 @@ public static function configurationOptions(\IPS\Member $member = null): array
return array(
'membersuspension' => array(
'type' => 'standard',
- 'notificationTypes' => ['submitted', 'approved', 'onhold', 'denied', 'deleted', 'filed', 'firststrike', 'secondstrike', 'thirdstrike'],
+ 'notificationTypes' => ['submitted', 'submitted_admin', 'approved', 'onhold', 'denied', 'deleted', 'filed', 'firststrike', 'secondstrike', 'thirdstrike'],
'default' => ['email', 'inline'],
'disabled' => ['push'],
'description' => 'notifications__dmca_Claim_desc',
@@ -50,7 +50,7 @@ public static function configurationOptions(\IPS\Member $member = null): array
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_submitted(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_submitted(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "Your copyright claim was submitted.",
@@ -60,6 +60,23 @@ public function parse_submitted(\IPS\Notification\Inline $notification, $htmlEsc
);
}
+ /**
+ * Parse notification: submitted_admin
+ *
+ * @param \IPS\Notification\Inline $notification The notification
+ * @param bool $htmlEscape TRUE to escape HTML in title
+ * @return array
+ */
+ public function parse_submitted_admin(\IPS\Notification\Inline $notification, $htmlEscape = true): array
+ {
+ return array(
+ 'title' => "A copyright claim was submitted.",
+ 'url' => \IPS\Http\Url::internal(''),
+ 'content' => "A copyright claim was submitted.",
+ 'author' => \IPS\Member::loggedIn(),
+ );
+ }
+
/**
* Parse notification: approved
*
@@ -67,7 +84,7 @@ public function parse_submitted(\IPS\Notification\Inline $notification, $htmlEsc
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_approved(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_approved(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "Your copyright claim was approved.",
@@ -84,7 +101,7 @@ public function parse_approved(\IPS\Notification\Inline $notification, $htmlEsca
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_onhold(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_onhold(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "Your copyright claim was placed on hold.",
@@ -101,7 +118,7 @@ public function parse_onhold(\IPS\Notification\Inline $notification, $htmlEscape
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_denied(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_denied(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "Your copyright claim was denied.",
@@ -118,7 +135,7 @@ public function parse_denied(\IPS\Notification\Inline $notification, $htmlEscape
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_deleted(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_deleted(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "The item in your copyright claim has been deleted.",
@@ -135,7 +152,7 @@ public function parse_deleted(\IPS\Notification\Inline $notification, $htmlEscap
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_filed(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_filed(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "A copyright claim has been filed against some content you posted. Check your email for more information.",
@@ -152,7 +169,7 @@ public function parse_filed(\IPS\Notification\Inline $notification, $htmlEscape=
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_firststrike(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_firststrike(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "The copyright claim that was filed against some content you posted was approved. This is your first strike. Check your email for more information.",
@@ -169,7 +186,7 @@ public function parse_firststrike(\IPS\Notification\Inline $notification, $htmlE
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_secondstrike(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_secondstrike(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "The copyright claim that was filed against some content you posted was approved. This is your second strike. Check your email for more information.",
@@ -186,7 +203,7 @@ public function parse_secondstrike(\IPS\Notification\Inline $notification, $html
* @param bool $htmlEscape TRUE to escape HTML in title
* @return array
*/
- public function parse_thirdstrike(\IPS\Notification\Inline $notification, $htmlEscape=true): array
+ public function parse_thirdstrike(\IPS\Notification\Inline $notification, $htmlEscape = true): array
{
return array(
'title' => "The copyright claim that was filed against some content you posted was approved. This is your last strike. Check your email for more information.",
diff --git a/src/modules/admin/system/settings.php b/src/modules/admin/system/settings.php
index a713959..8cbefc9 100644
--- a/src/modules/admin/system/settings.php
+++ b/src/modules/admin/system/settings.php
@@ -84,6 +84,13 @@ protected function manage()
'key' => 'FinalSteps'
]));
+ $form->addTab('dmca_settings_tab_admin_notifications');
+ $form->addHeader('dmca_settings');
+ $form->add(new Form\Select('dmca_admin_group', explode(',', \IPS\Settings::i()->dmca_admin_group), false, [
+ 'options' => $groups,
+ 'multiple' => true,
+ ]));
+
$form->addTab('dmca_settings_tab_notifications');
$form->addHeader('dmca_settings');
$form->add(new Form\Editor('dmca_submitted_email', \IPS\Settings::i()->dmca_submitted_email, true, [
diff --git a/src/setup/upg_10003/data.json b/src/setup/upg_10003/data.json
new file mode 100644
index 0000000..f594029
--- /dev/null
+++ b/src/setup/upg_10003/data.json
@@ -0,0 +1,23 @@
+{
+ "id": 10003,
+ "name": "1.0.3",
+ "steps": {
+ "queries": false,
+ "lang": true,
+ "theme": false,
+ "themeSettings": false,
+ "javascript": false,
+ "emailTemplates": true,
+ "hooks": false,
+ "acpSearchKeywords": false,
+ "settings": true,
+ "tasks": false,
+ "modules": false,
+ "widgets": false,
+ "customOptions": false,
+ "customRoutines": false
+ },
+ "forceMainUpgrader": false,
+ "forceManualDownloadNoCiC": false,
+ "forceManualDownloadCiC": false
+}
\ No newline at end of file
diff --git a/src/setup/upg_10003/emailTemplates.json b/src/setup/upg_10003/emailTemplates.json
new file mode 100644
index 0000000..9cfb0e3
--- /dev/null
+++ b/src/setup/upg_10003/emailTemplates.json
@@ -0,0 +1,11 @@
+{
+ "added": [
+ "notification_submitted_admin"
+ ],
+ "edited": [
+ "notification_filed",
+ "notification_firststrike",
+ "notification_thirdstrike"
+ ],
+ "removed": []
+}
\ No newline at end of file
diff --git a/src/setup/upg_10003/lang.json b/src/setup/upg_10003/lang.json
new file mode 100644
index 0000000..ac1b2cd
--- /dev/null
+++ b/src/setup/upg_10003/lang.json
@@ -0,0 +1,23 @@
+{
+ "normal": {
+ "added": [
+ "mailsub__dmca_notification_submitted_admin",
+ "mailsub__dmca_submitted_admin",
+ "dmca_settings_tab_admin_notifications",
+ "dmca_admin_group",
+ "dmca_admin_group_desc",
+ "description_work",
+ "description_work_desc"
+ ],
+ "edited": [],
+ "removed": [
+ "description",
+ "description_desc"
+ ]
+ },
+ "js": {
+ "added": [],
+ "edited": [],
+ "removed": []
+ }
+}
\ No newline at end of file
diff --git a/src/setup/upg_10003/settings.json b/src/setup/upg_10003/settings.json
new file mode 100644
index 0000000..f29c02b
--- /dev/null
+++ b/src/setup/upg_10003/settings.json
@@ -0,0 +1,7 @@
+{
+ "added": [
+ "dmca_admin_group"
+ ],
+ "edited": [],
+ "removed": []
+}
\ No newline at end of file
diff --git a/src/sources/Reports/Report.php b/src/sources/Reports/Report.php
index a2440ef..ca83e66 100644
--- a/src/sources/Reports/Report.php
+++ b/src/sources/Reports/Report.php
@@ -186,6 +186,26 @@ public function save()
Email::buildFromTemplate('dmca', 'submitted', [$this->name, Settings::i()->dmca_submitted_email, $this], Email::TYPE_TRANSACTIONAL)->send($this->email);
}
+ if ($adminGroups = \IPS\Settings::i()->dmca_admin_group) {
+ $select = \IPS\Db::i()->select('*', \IPS\Member::$databaseTable, [
+ \IPS\Db::i()->findInSet('mgroup_others', explode(',', $adminGroups)) .
+ ' OR ' .
+ \IPS\Db::i()->findInSet('member_group_id', explode(',', $adminGroups))
+ ]);
+
+ $adminMembers = array_map(function ($member) {
+ return \IPS\Member::constructFromData($member);
+ }, iterator_to_array($select));
+
+ $notification = new Notification(Application::load('dmca'), 'submitted_admin', null, [$this]);
+
+ foreach ($adminMembers as $adminMember) {
+ $notification->recipients->attach($adminMember);
+ }
+
+ $notification->send();
+ }
+
$urls = explode(',', $this->urls);
$emailProcessed = [];
@@ -225,6 +245,7 @@ public static function findContentItem($url)
$classes = match ($url->hiddenQueryString['app']) {
'forums' => [Topic::class, Post::class],
'gallery' => [Image::class, Album::class],
+ default => []
};
}