first import

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-08 11:40:19 +02:00
commit 1bc61b12ad
8435 changed files with 1582817 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<?php
/**
* Set the context on the basis of the node type of page's book root.
*/
class context_condition_bookroot extends context_condition_node {
function execute($node, $op) {
if ($this->condition_used() && !empty($node->book['bid'])) {
$type = db_select('node')
->fields('node', array('type'))
->condition('nid', $node->book['nid'])
->execute()
->fetchField();
$book = new stdClass();
$book->type = $type;
parent::execute($book, $op);
}
}
}