[#1224] Bad "New Story" link in Block/news
Summary Bad "New Story" link in Block/news
Queue Chora
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners
Requester mathieu (dot) clabaut (at) free (dot) fr
Created 01/21/2005 (1446 days ago)
Due
Updated 01/22/2005 (1445 days ago)
Assigned
Resolved 01/22/2005 (1445 days ago)
Attachments block.news.diff Download
Milestone
Patch No

History
01/22/2005 Chuck Hagenbuch Comment #3
State ⇒ Resolved
Reply to this comment
Committed, thanks.
01/21/2005 mathieu (dot) clabaut (at) free (dot) fr Comment #2
New Attachment: block.news.diff Download
Reply to this comment
Added the patch as attachment.
01/21/2005 mathieu (dot) clabaut (at) free (dot) fr Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Queue ⇒ Chora
Summary ⇒ Bad "New Story" link in Block/news
Type ⇒ Bug
Reply to this comment
the "New story" link in the heading of the News Block didn't set the
   channel_id attributes.

Patch proposal :
Index: news.php
===================================================================
RCS file: /repository/jonah/lib/Block/news.php,v
retrieving revision 1.27
diff -u -B -b -w -r1.27 news.php
--- news.php    3 Jan 2005 14:35:07 -0000       1.27
+++ news.php    21 Jan 2005 17:27:59 -0000
@@ -80,7 +80,9 @@

          if ($channel['channel_type'] == JONAH_INTERNAL_CHANNEL &&
               
Jonah::checkPermissions(Jonah::typeToPermName($channel['channel_type']),
PERMS_EDIT)) {
-            $html .= ' :: ' . 
Horde::link(Horde::applicationUrl('stories/edit.php',
true), _("New Story"), 'smallheader') . Horde::img('editstory.png', 
_("New Story"),
'align="middle"') . ' ' . _("New Story") . '</a>';
+            $url = Horde::applicationUrl('stories/edit.php', true);
+            $url = Util::addParameter($url,array('channel_id' =>
$channel['channel_id']));
+            $html .= ' :: ' . Horde::link($url, _("New Story"), 
'smallheader') .
Horde::img('editstory.png', _("New Story"), 'align="middle"') . ' ' . 
_("New Story") .
'</a>';
          }

          return $html;