1
0

insure that a default is set for item_id on the get_edit_form. Not sure why my testing last night didn't catch that :-/

This commit is contained in:
Tim Almdal 2011-06-20 17:33:51 -07:00
parent d8de48f271
commit c1ed4cf475

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
class ContactOwner_Controller extends Controller { class ContactOwner_Controller extends Controller {
static function get_email_form($user_id, $item_id) { static function get_email_form($user_id, $item_id=null) {
// Determine name of the person the message is going to. // Determine name of the person the message is going to.
$str_to_name = ""; $str_to_name = "";
if ($user_id == -1) { if ($user_id == -1) {
@ -34,7 +34,7 @@ class ContactOwner_Controller extends Controller {
// If item_id is set, include a link to the item. // If item_id is set, include a link to the item.
$email_body = ""; $email_body = "";
if ($item_id <> "") { if (!empty($item_id)) {
$item = ORM::factory("item", $item_id); $item = ORM::factory("item", $item_id);
$email_body = "This message refers to <a href=\"" . url::abs_site("{$item->type}s/{$item->id}") . "\">this page</a>."; $email_body = "This message refers to <a href=\"" . url::abs_site("{$item->type}s/{$item->id}") . "\">this page</a>.";
} }