need to check if the user enabled the clean url or not before using the drupal_add_feed

Jadelrab - April 24, 2007 - 11:35
Project:Article
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:msameer
Status:closed
Description

In line 170 : the developer used drupal_add_feed function without checking if the user enabled the clean_url or not .. he assumed it is enabled by default which raise error when trying to get it with no clean url enabled ..
i did found a solution for that by checking if clean url is enabled by changing the line 170 to :

if (!variable_get("clean_url",0)){
    $feedlink = "?q=article/feed";
    }else{
    $feedlink = "article/feed";
    }
      $feed = drupal_add_feed($feedlink, t('Articles'));

Thanks~

#1

msameer - April 24, 2007 - 11:58
Assigned to:Anonymous» msameer

It should be:

$feed = drupal_add_feed(url('article/feed'), t('Articles'));

Will fix it tonight.

#2

msameer - September 26, 2007 - 20:53
Status:active» fixed

Fixed in CVS

#3

Anonymous - October 10, 2007 - 21:11
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.