No need to include common.inc in yui_init()

mustafau - June 5, 2008 - 08:18
Project:Yahoo YUI
Version:6.x-1.1-2
Component:Code
Category:bug report
Priority:normal
Assigned:drupalhizmetleri
Status:closed
Description

In Drupal 6.x you don't need to include "includes/common.inc" in yui_init().

#1

drupalhizmetleri - June 5, 2008 - 08:54

This is included because of the reported problem http://drupal.org/node/228344 When the cache ise enabled the drupal_add_js() function in common.inc is not visible to yui modules. I will check drupal 6 for the same case.

#2

mustafau - June 5, 2008 - 08:57

The issue #228344: When activating cache in "normal" mode, site is unaccessible because of call to undefined function drupal_add_js() is specific to D5. D6 should not be affected. As you can see documentation at http://api.drupal.org/api/function/hook_init calls drupal_add_css() in hook_init(). It is safe to remove require_once './includes/common.inc'; from yui_init() in 6.x-1.x.

#3

drupalhizmetleri - June 7, 2008 - 16:09
Version:6.x-1.x-dev» 6.x-1.1-2
Status:patch (code needs review)» fixed

#4

drupalhizmetleri - June 7, 2008 - 16:09
Assigned to:Anonymous» drupalhizmetleri

#5

Anonymous (not verified) - June 21, 2008 - 16:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.