1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Custom Views integration join for the page counters
|
6 |
|
|
*
|
7 |
|
|
* @ingroup print
|
8 |
|
|
*/
|
9 |
|
|
|
10 |
|
|
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 |
a2baadd1
|
Assos Assos
|
function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') {
|
15 |
85ad3d82
|
Assos Assos
|
parent::construct($table, $left_table, $left_field, $field, $extra, $type);
|
16 |
|
|
}
|
17 |
|
|
|
18 |
|
|
function build_join($select_query, $table, $view_query) {
|
19 |
a2baadd1
|
Assos Assos
|
if ($this->left_table) {
|
20 |
|
|
$this->left_field = "CONCAT('node/', $this->left_table.$this->left_field)";
|
21 |
|
|
$this->left_table = NULL;
|
22 |
|
|
}
|
23 |
85ad3d82
|
Assos Assos
|
parent::build_join($select_query, $table, $view_query);
|
24 |
|
|
}
|
25 |
|
|
} |