Revision 76bdcd04
Added by Assos Assos almost 6 years ago
drupal7/sites/all/modules/print/print_join_page_counter.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Custom Views integration join for the page counters |
|
5 |
* Custom Views integration join for the page counters.
|
|
6 | 6 |
* |
7 | 7 |
* @ingroup print |
8 | 8 |
*/ |
9 | 9 |
|
10 |
/** |
|
11 |
* Class print_join_page_counter. |
|
12 |
*/ |
|
10 | 13 |
class print_join_page_counter extends views_join { |
11 |
// PHP 4 doesn't call constructors of the base class automatically from a |
|
12 |
// constructor of a derived class. It is your responsibility to propagate |
|
13 |
// the call to constructors upstream where appropriate. |
|
14 |
function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') { |
|
14 |
|
|
15 |
/** |
|
16 |
* @inheritdoc |
|
17 |
*/ |
|
18 |
public function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') { |
|
19 |
// PHP 4 doesn't call constructors of the base class automatically from a |
|
20 |
// constructor of a derived class. It is your responsibility to propagate |
|
21 |
// the call to constructors upstream where appropriate. |
|
15 | 22 |
parent::construct($table, $left_table, $left_field, $field, $extra, $type); |
16 | 23 |
} |
17 | 24 |
|
18 |
function build_join($select_query, $table, $view_query) { |
|
25 |
/** |
|
26 |
* @inheritdoc |
|
27 |
*/ |
|
28 |
public function build_join($select_query, $table, $view_query) { |
|
19 | 29 |
if ($this->left_table) { |
20 | 30 |
$this->left_field = "CONCAT('node/', $this->left_table.$this->left_field)"; |
21 | 31 |
$this->left_table = NULL; |
22 | 32 |
} |
23 | 33 |
parent::build_join($select_query, $table, $view_query); |
24 | 34 |
} |
35 |
|
|
25 | 36 |
} |
Also available in: Unified diff
Weekly update of contrib modules