Reviewed & tested by the community
Project:
Netnews (NNTP)
Version:
master
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
28 Sep 2005 at 13:26 UTC
Updated:
28 Sep 2005 at 13:26 UTC
My installation has all the try-out modules installed in /modules/contrib , so the hard-coded path /modules/netnews/nntpserver.inc is incorrect.
Drupal supports loading modules from anywhere, and also supports letting you know where the module actually is - via drupal_get_path()
So I've patched twice:
netnews.module 2005/09/09
Line 842
require_once(drupal_get_path("module","netnews") .'/nntpserver.inc');
Line 1693
$fp = fopen(drupal_get_path("module","netnews").'/'.$runtime['name'].'.trace', 'a');
... I think you'll find this good practice ;-)
I was very happy when I learnt about drupal_get_path
.dan.
Comments
Comment #1
janb commentedAh, thanks, since I split the module up in more files now, it becomes even more necessary to do this the right way.