[Tickets #1224] NEW: Bad "New Story" link in Block/news

bugs at bugs.horde.org bugs at bugs.horde.org
Fri Jan 21 09:34:23 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1224
-----------------------------------------------------------------------
 Ticket     | 1224
 Created By | mathieu.clabaut at free.fr
 Summary    | Bad "New Story" link in Block/news
 Queue      | Chora
 Version    | HEAD
 State      | Unconfirmed
 Priority   | 2. Medium
 Type       | Bug
 Owners     | 
-----------------------------------------------------------------------


mathieu.clabaut at free.fr (2005-01-21 09:34) wrote:

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;






More information about the bugs mailing list