A variety of cleanups:

* Allow for the "movie" type in all of our text
* Try to follow the pattern of mainly only passing ORM objects
  to the view and let it generate its own text (this becomes
  even more important when 3rd parties want to customize notification
  messages)
* Rename _send_message to be _notify_subscribers to be more acccurate
  and have it explicitly take a subject in the API
* Use Item_Model::url() in the views instead of hand crafting URLs
* Reformat HTML in views
* Use $comment->author_xxx() functions instead of replicating that code
* Fix several places where we were encoding data by doing ucfirst($item->type)
  with conditionals where we form the text properly.  We should *never*
  be showing data types to the end user!  This is not localizable!

Note that this probably breaks the existing batch processing code.  I
am going to redo that in a subsequent pass.
This commit is contained in:
Bharat Mediratta
2009-03-04 06:25:55 +00:00
parent 83e12961b1
commit b493a534f2
6 changed files with 143 additions and 139 deletions

View File

@@ -1,19 +1,31 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<html>
<head>
<title><?= $subject ?> </title>
</head>
<body>
<h2><?= sprintf(t("A new comment was added by %s"), $author); ?></h2>
<table>
<tr>
<td><?= t("Comment:") ?></td>
<td><?= $text ?></td>
</tr>
<tr>
<td><?= t("Url:") ?></td>
<td><a href="<?= $url ?>"><?= $url ?></a></td>
</tr>
</table>
</body>
<head>
<title><?= $subject ?> </title>
</head>
<body>
<h2><?= $subject ?></h2>
<table>
<tr>
<td><?= t("Comment:") ?></td>
<td><?= $comment->text ?></td>
</tr>
<tr>
<td><?= t("Author Name:") ?></td>
<td><?= $comment->author_name() ?></td>
</tr>
<tr>
<td><?= t("Author Email:") ?></td>
<td><?= $comment->author_email() ?></td>
</tr>
<tr>
<td><?= t("Author URL:") ?></td>
<td><?= $comment->author_url() ?></td>
</tr>
<tr>
<td><?= t("Url:") ?></td>
<td><a href="<?= $comment->item()->url(array(), true) ?>#comments"><?= $comment->item()->url(array(), true) ?>#comments</a></td>
</tr>
</table>
</body>
</html>