aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2010-10-21 17:11:25 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2010-10-21 17:11:25 +0000
commit7d5c4370ef18072c936cde31b095f207056bc06b (patch)
tree8c97bae28126f6dafe2e3f5506e611a65dbf0caf /h-source/Application
parent2c3856df1196c92db2cf7e76f8d523f9bdd44177 (diff)
no public notice is left where a message is deleted by a moderator
Diffstat (limited to 'h-source/Application')
-rw-r--r--h-source/Application/Controllers/GenericController.php2
-rw-r--r--h-source/Application/Controllers/IssuesController.php2
-rw-r--r--h-source/Application/Models/IssuesModel.php1
-rw-r--r--h-source/Application/Views/Issues/view.php43
-rw-r--r--h-source/Application/Views/talk.php12
5 files changed, 31 insertions, 29 deletions
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php
index a08956e..1b9e64a 100644
--- a/h-source/Application/Controllers/GenericController.php
+++ b/h-source/Application/Controllers/GenericController.php
@@ -361,7 +361,7 @@ class GenericController extends BaseController
if (count($data['table']) > 0)
{
- $data['talk_number'] = $this->m['TalkModel']->select('count(*) as numb,id_hard')->where(array('id_hard'=>$clean['id_hard']))->rowNumber();
+ $data['talk_number'] = $this->m['TalkModel']->select('count(*) as numb,id_hard')->where(array('id_hard'=>$clean['id_hard'],'deleted'=>'no'))->rowNumber();
$data['ne_name'] = $data['table'][0]['hardware']['model'];
$data['name'] = encodeUrl($data['ne_name']);
diff --git a/h-source/Application/Controllers/IssuesController.php b/h-source/Application/Controllers/IssuesController.php
index 02f6499..80a9486 100644
--- a/h-source/Application/Controllers/IssuesController.php
+++ b/h-source/Application/Controllers/IssuesController.php
@@ -90,7 +90,7 @@ class IssuesController extends BaseController
//load the Pages helper
$this->helper('Pages',$this->controller.'/viewall/'.$this->lang,'page');
//get the number of records
- $this->m['IssuesModel']->from('issues left join messages')->using('id_issue')->aWhere(array('deleted'=>'no'))->groupBy('issues.id_issue');
+ $this->m['IssuesModel']->from('issues left join messages')->using('id_issue')->aWhere(array('deleted'=>'no','-deleted'=>'no'))->groupBy('issues.id_issue');
$recordNumber = $this->m['IssuesModel']->rowNumber();
$page = $this->viewArgs['page'];
diff --git a/h-source/Application/Models/IssuesModel.php b/h-source/Application/Models/IssuesModel.php
index 8ca8a52..115c0f3 100644
--- a/h-source/Application/Models/IssuesModel.php
+++ b/h-source/Application/Models/IssuesModel.php
@@ -30,6 +30,7 @@ class IssuesModel extends Model_Tree {
'priority' => 'issues',
'status' => 'issues',
'topic' => 'issues',
+ '-deleted' => 'messages',
);
$this->_popupItemNames = array(
diff --git a/h-source/Application/Views/Issues/view.php b/h-source/Application/Views/Issues/view.php
index 20d0403..ef5e39c 100644
--- a/h-source/Application/Views/Issues/view.php
+++ b/h-source/Application/Views/Issues/view.php
@@ -129,33 +129,32 @@
<?php } else { ?>
- <div class="issues_message_item_hidden">
- <?php echo gtext("this message has been deleted");?>
- <?php if ($ismoderator) { ?>
- <a id="<?php echo $row['messages']['id_mes'];?>" class="show_message hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png">make visible</a>
+ <?php if ($ismoderator) { ?>
+ <div class="issues_message_item_hidden">
+ <?php echo gtext("this message has been deleted");?>
- <!--view details-->
- <div class="show_hidden_box_ext">
- <div class="md_type">message</div>
+ <a id="<?php echo $row['messages']['id_mes'];?>" class="show_message hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png">make visible</a>
- <a id="<?php echo $row['messages']['id_mes'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
-
- <div class="details_of_hidden_message">
- <div class="details_of_hidden_message_inner">
- <div class="talk_message_item_date">
- submitted by <?php echo getLinkToUser($u->getUser($row['messages']['created_by']));?>, <?php echo smartDate($row['messages']['creation_date']);?>
- </div>
- <div class="message_view_description_hidden">
- <?php echo decodeWikiText($row['messages']['message']);?>
+ <!--view details-->
+ <div class="show_hidden_box_ext">
+ <div class="md_type">message</div>
+
+ <a id="<?php echo $row['messages']['id_mes'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
+
+ <div class="details_of_hidden_message">
+ <div class="details_of_hidden_message_inner">
+ <div class="talk_message_item_date">
+ submitted by <?php echo getLinkToUser($u->getUser($row['messages']['created_by']));?>, <?php echo smartDate($row['messages']['creation_date']);?>
+ </div>
+ <div class="message_view_description_hidden">
+ <?php echo decodeWikiText($row['messages']['message']);?>
+ </div>
</div>
+ <div class="moderation_details_box"></div>
</div>
- <div class="moderation_details_box"></div>
</div>
- </div>
-
- <?php } ?>
- </div>
-
+ </div>
+ <?php } ?>
<?php } ?>
<?php } ?>
diff --git a/h-source/Application/Views/talk.php b/h-source/Application/Views/talk.php
index 6ae3bca..d0872f4 100644
--- a/h-source/Application/Views/talk.php
+++ b/h-source/Application/Views/talk.php
@@ -66,10 +66,11 @@
</div>
<?php } else { ?>
-
- <div class="talk_message_item_hidden">
+
+ <?php if ($ismoderator) { ?>
+ <div class="talk_message_item_hidden">
this message has been deleted
- <?php if ($ismoderator) { ?>
+
<a id="<?php echo $message['talk']['id_talk'];?>" class="show_talk hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png">make visible</a>
<!--view details-->
@@ -91,9 +92,10 @@
</div>
</div>
- <?php } ?>
+
</div>
-
+ <?php } ?>
+
<?php } ?>
<?php } ?>