diff --git a/code/CommentTableField.php b/code/CommentTableField.php index e64a6ca9..6584009f 100644 --- a/code/CommentTableField.php +++ b/code/CommentTableField.php @@ -76,7 +76,7 @@ class CommentTableField extends ComplexTableField { } } - function accept() { + function approve() { if(!Permission::check('ADMIN')) { return false; } @@ -96,10 +96,10 @@ class CommentTableField extends ComplexTableField { } function HasSpamButton() { - return $this->mode == 'accepted' || $this->mode == 'unmoderated'; + return $this->mode == 'approved' || $this->mode == 'unmoderated'; } - function HasAcceptButton() { + function HasApproveButton() { return $this->mode == 'unmoderated'; } @@ -131,8 +131,8 @@ class CommentTableField_Item extends ComplexTableField_Item { return $this->parent()->HasSpamButton(); } - function HasAcceptButton() { - return $this->parent()->HasAcceptButton(); + function HasApproveButton() { + return $this->parent()->HasApproveButton(); } function HasHamButton() { @@ -147,8 +147,8 @@ class CommentTableField_Item extends ComplexTableField_Item { return $this->BaseLink() . "&methodName=ham"; } - function AcceptLink() { - return $this->BaseLink() . "&methodName=accept"; + function ApproveLink() { + return $this->BaseLink() . "&methodName=approve"; } } diff --git a/code/FeedbackAdmin.php b/code/FeedbackAdmin.php index 43f4e066..6698a10b 100644 --- a/code/FeedbackAdmin.php +++ b/code/FeedbackAdmin.php @@ -23,8 +23,8 @@ class FeedbackAdmin extends LeftAndMain { } $section = substr($url, strrpos($url, '/') + 1); - if($section != 'accepted' && $section != 'unmoderated' && $section != 'spam') { - $section = 'accepted'; + if($section != 'approved' && $section != 'unmoderated' && $section != 'spam') { + $section = 'approved'; } return $section; @@ -33,9 +33,9 @@ class FeedbackAdmin extends LeftAndMain { public function EditForm() { $section = $this->Section(); - if($section == 'accepted') { + if($section == 'approved') { $filter = 'IsSpam=0 AND NeedsModeration=0'; - $title = "

Accepted Comments

"; + $title = "

Approved Comments

"; } else if($section == 'unmoderated') { $filter = 'NeedsModeration=1'; $title = "

Comments Awaiting Moderation

"; @@ -159,7 +159,7 @@ JS; JS; } - function acceptmarked() { + function approvemarked() { $numComments = 0; $folderID = 0; $deleteList = ''; diff --git a/code/sitefeatures/PageComment.php b/code/sitefeatures/PageComment.php index 39639212..e9741956 100755 --- a/code/sitefeatures/PageComment.php +++ b/code/sitefeatures/PageComment.php @@ -63,9 +63,9 @@ class PageComment extends DataObject { } } - function AcceptLink() { + function ApproveLink() { if(Permission::check('CMS_ACCESS_CMSMain') && $this->getField('NeedsModeration')) { - return "PageComment/accept/$this->ID"; + return "PageComment/approve/$this->ID"; } } @@ -77,7 +77,7 @@ class PageComment extends DataObject { } } - function accept() { + function approve() { if(Permission::check('CMS_ACCESS_CMSMain')) { $comment = DataObject::get_by_id("PageComment", $this->urlParams['ID']); $comment->NeedsModeration = false; diff --git a/javascript/CommentTableField.js b/javascript/CommentTableField.js index 11f3aa62..928a7da0 100644 --- a/javascript/CommentTableField.js +++ b/javascript/CommentTableField.js @@ -7,7 +7,7 @@ CommentTableField.prototype = { onclick: this.removeRowAfterAjax.bind(this) }; - rules['#'+this.id+' table.data a.acceptlink'] = { + rules['#'+this.id+' table.data a.approvelink'] = { onclick: this.removeRowAfterAjax.bind(this) }; diff --git a/javascript/PageCommentInterface.js b/javascript/PageCommentInterface.js index d82da0bd..7e4250e2 100755 --- a/javascript/PageCommentInterface.js +++ b/javascript/PageCommentInterface.js @@ -20,8 +20,8 @@ PageCommentInterface.prototype = { '#PageComments a.hamlink' : { onclick : this.reportHam }, - '#PageComments a.acceptlink' : { - onclick : this.acceptComment + '#PageComments a.approvelink' : { + onclick : this.approveComment } }); }, @@ -188,10 +188,10 @@ PageCommentInterface.prototype = { /** * Ajax handler of ham reporting */ - acceptComment: function() { + approveComment: function() { var __comment = this.parentNode.parentNode.parentNode; - __comment.getElementsByTagName('span')[0].innerHTML = "Marking comment as accepted..."; + __comment.getElementsByTagName('span')[0].innerHTML = "Marking comment as approved..."; new Ajax.Request(this.href + '?ajax=1', { onSuccess : function(response) { diff --git a/templates/Includes/CommentTableField.ss b/templates/Includes/CommentTableField.ss index 687d67d6..f1d3f1a9 100644 --- a/templates/Includes/CommentTableField.ss +++ b/templates/Includes/CommentTableField.ss @@ -13,7 +13,7 @@ <% end_control %> <% if Can(edit) %> <% end_if %> - <% if HasAcceptButton %> <% end_if %> + <% if HasApproveButton %> <% end_if %> <% if HasSpamButton %> <% end_if %> <% if HasHamButton %> <% end_if %> <% if Can(delete) %> <% end_if %> @@ -28,7 +28,7 @@ class="$Function"<% end_if %>>  <% end_control %> <% if Can(edit) %> <% end_if %> - <% if HasAcceptButton %> <% end_if %> + <% if HasApproveButton %> <% end_if %> <% if HasSpamButton %> <% end_if %> <% if HasHamButtom %> <% end_if %> <% if Can(delete) %> <% end_if %> @@ -46,8 +46,8 @@ <% if Can(edit) %> edit <% end_if %> - <% if HasAcceptButton %> - accept + <% if HasApproveButton %> + approve <% end_if %> <% if HasSpamButton %> spam @@ -65,7 +65,7 @@ <% if Markable %> <% end_if %> No items found <% if Can(edit) %> <% end_if %> - <% if HasAcceptButton %> <% end_if %> + <% if HasApproveButton %> <% end_if %> <% if HasSpamButton %> <% end_if %> <% if HasHamButtom %> <% end_if %> <% if Can(delete) %> <% end_if %> diff --git a/templates/Includes/FeedbackAdmin_SiteTree.ss b/templates/Includes/FeedbackAdmin_SiteTree.ss index 94dc93c2..373efd3b 100644 --- a/templates/Includes/FeedbackAdmin_SiteTree.ss +++ b/templates/Includes/FeedbackAdmin_SiteTree.ss @@ -1,8 +1,8 @@