Bug 356512 - "Allow sufficiently empowered users to delete parties and comments" [p=ryan@ryanflint.com] (nit fixes from original patch)

This commit is contained in:
reed%reedloden.com 2006-10-13 17:23:11 +00:00
Родитель 5d86121dc4
Коммит 81d8ea8be1
6 изменённых файлов: 15 добавлений и 8 удалений

Просмотреть файл

@ -78,6 +78,10 @@ class AdminController extends AppController {
$this->Comment->id = $id;
$comment = $this->Comment->read();
$this->set('comment', $comment);
$uid = $this->User->findById($comment['Comment']['owner']);
$this->set('owner', $uid['User']['name']);
$this->data = $comment;
break;
}

Просмотреть файл

@ -76,7 +76,7 @@ class FeedsController extends AppController {
$party = $this->Feed->findById($id);
$this->set('party', $party);
if (FLICKR_API_KEY != null) {
if (FLICKR_API_KEY != null && !$party['Party']['canceled']) {
if ($party['Feeds']['useflickr'] == 1) {
$data = array('type' => 'flickr', 'userid' => $party['Feeds']['flickrid'], 'randomize' => false);
$flickr = new webServices($data);

Просмотреть файл

@ -1,5 +1,5 @@
<?php if (isset($user)): ?>
<h1>User <?php echo $user['User']['id']; ?></h1>
<h1>User <?php echo $user['User']['name'].' ('.$user['User']['id']; ?>)</h1>
<form class="fxform" action="<?php echo $html->url('/admin/edit/user/'.$user['User']['id']); ?>" method="post">
<div>
<label for="UserName" class="label-large">Name:</label>
@ -19,7 +19,7 @@
</div>
<div>
<label for="location" class="label-large">Location:</label>
<?php echo $html->input('User/location'); ?>
<?php echo $html->input('User/location', array('size' => 40)); ?>
</div>
<div>
<label for="UserShowemail" class="label-large">Show email:</label>
@ -37,7 +37,7 @@
</form>
<?php endif; if (isset($party)): ?>
<h1>Party <?php echo $party['Party']['id']; ?></h1>
<h1>Party <?php echo $party['Party']['name'].' ('.$party['Party']['id']; ?>)</h1>
<form class="fxform" action="<?php echo $html->url('/admin/edit/party/'.$party['Party']['id']); ?>" method="post">
<div>
<label for="PartyOwner" class="label-large">Party Owner:</label>
@ -108,7 +108,7 @@
</form>
<?php endif; if(isset($comment)): ?>
<h1>Comment <?php echo $comment['Comment']['id']; ?></h1>
<h1>Comment by <?php echo $owner.' (<a href="'.APP_BASE.$html->url('/admin/edit/user/'.$comment['Comment']['owner']).'">'.$comment['Comment']['owner']; ?></a>)</h1>
<form class="fxform" action="<?php echo $html->url('/admin/edit/comment/'.$comment['Comment']['id']); ?>" method="post">
<div>
<label for="CommentAssoc" class="label-large">Party:</label>

Просмотреть файл

@ -5,7 +5,8 @@ PRODID:-//MozillaPartyTool//calendar//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
<?php foreach($events as $event): ?>
<?php foreach($events as $event):
if ($event['Feeds']['canceled']) continue; ?>
BEGIN:VEVENT
UID:<?php echo APP_BASE.$html->url('/parties/view/'.$event['Feeds']['id'])."\n"; ?>
DTSTAMP:<?php echo gmdate('Ymd\This\Z', $event['Feeds']['date'])."\n"; ?>

Просмотреть файл

@ -5,7 +5,8 @@
<description><?php echo APP_NAME." - Latest Parties"; ?></description>
<link><?php echo APP_BASE.$html->url('/'); ?></link>
<title><?php echo APP_NAME." - Latest Parties"; ?></title>
<?php foreach($latest as $party): ?>
<?php foreach($latest as $party):
if ($party['Feeds']['canceled']) continue; ?>
<item>
<title><?php echo $party['Feeds']['name'] ?></title>
<description><?php echo $party['Feeds']['vname'] ?></description>

Просмотреть файл

@ -5,7 +5,8 @@
<description><?php echo APP_NAME." - Upcoming Parties"; ?></description>
<link><?php echo APP_BASE.$html->url('/'); ?></link>
<title><?php echo APP_NAME." - Upcoming Parties"; ?></title>
<?php foreach($latest as $party): ?>
<?php foreach($latest as $party):
if ($party['Feeds']['canceled']) continue; ?>
<item>
<title><![CDATA[<?php echo $party['Feeds']['name'] ?>]]></title>
<description><?php echo date('Y-m-d H:i', $party['Feeds']['date']); ?></description>