print_join_page_counter.inc 849 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * @file
  4. * Custom Views integration join for the page counters
  5. *
  6. * @ingroup print
  7. */
  8. class print_join_page_counter extends views_join {
  9. // PHP 4 doesn't call constructors of the base class automatically from a
  10. // constructor of a derived class. It is your responsibility to propagate
  11. // the call to constructors upstream where appropriate.
  12. function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') {
  13. parent::construct($table, $left_table, $left_field, $field, $extra, $type);
  14. }
  15. function build_join($select_query, $table, $view_query) {
  16. if ($this->left_table) {
  17. $this->left_field = "CONCAT('node/', $this->left_table.$this->left_field)";
  18. $this->left_table = NULL;
  19. }
  20. parent::build_join($select_query, $table, $view_query);
  21. }
  22. }