url::site is implicit in Forge actions, don't specify it a 2nd time

This commit is contained in:
Bharat Mediratta
2008-12-29 18:38:40 +00:00
parent 62cd05fb16
commit 3c0be5156b
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -53,7 +53,7 @@ class comment_Core {
}
static function get_add_form($item) {
$form = new Forge(url::site("comments"), "", "post");
$form = new Forge("comments", "", "post");
$group = $form->group("add_comment")->label(_("Add comment"));
$group->input("author") ->label(_("Author")) ->id("gAuthor");
$group->input("email") ->label(_("Email")) ->id("gEmail");
@@ -65,8 +65,7 @@ class comment_Core {
}
static function get_edit_form($comment) {
$form = new Forge(
url::site("comments/{$comment->id}?_method=put"), "", "post");
$form = new Forge("comments/{$comment->id}?_method=put", "", "post");
$group = $form->group("edit_comment")->label(_("Edit comment"));
$group->input("author") ->label(_("Author")) ->id("gAuthor") ->value($comment->author);
$group->input("email") ->label(_("Email")) ->id("gEmail") ->value($comment->email);
+1 -1
View File
@@ -80,7 +80,7 @@ class tag_Core {
}
public static function get_add_form($item) {
$form = new Forge(url::site("tags"), "", "post", array("id" => "gAddTagForm"));
$form = new Forge("tags", "", "post", array("id" => "gAddTagForm"));
$group = $form->group("add_tag")->label(_("Add Tag"));
$group->input("tag_name")->label(_("Add tag"));
$group->hidden("item_id")->value($item->id);