Closed (works as designed)
Project:
Views (for Drupal 7)
Version:
6.x-2.9
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2010 at 13:02 UTC
Updated:
14 Feb 2012 at 02:34 UTC
Was trying for 2 hours to figure out what was wrong with this line of code
$join = new views_join('locales_source', 'term_data', 'name', 'source', array(), 'LEFT');
Thanks to @dereine I figured it out.
Well, it would be really easy to just make a wrapper function around the pseudo constructor of views_join, support both PHP5 and PHP4
| Comment | File | Size | Author |
|---|---|---|---|
| views.handlers.inc_.patch | 1.06 KB | rapsli |
Comments
Comment #1
dawehnerLooks fine.
This can be especially commited to drupal-7--3 because we can rely on php5 there.
Comment #2
merlinofchaos commentedThis wrapper works only for PHP5, leaving a disconnect for PHP4.
Perhaps the documentation is inadequate, but the constructor isn't intended to be used that way. In fact, I'm not sure that any existing implementation of views_join even uses construct() at this point (It's possible that I can't remember some, tho) in favor of just setting the variables individually via a definition.
Comment #3
rapsli commentedwell, I was more thinking for modules/plugins that actually do use PHP5. The PHP 4 guys could still use the class the same way as today, the PHP 5 kids could though use it the easy way.
Comment #4
tim.plunkettNowhere in any of the three Views branches is `new views_join` called with any parameters.
Checked with
grep -nr "new views_join([^)]" *