Introducing an exception for select SuiteDesk documents and projects books

This commit is contained in:
Manuel Cillero 2017-07-26 09:07:07 +02:00
parent b98028868f
commit ff0127e5f5

View file

@ -268,7 +268,7 @@ function book_get_books($type = null) {
if ($nids) {
$result2 = db_query(db_rewrite_sql("SELECT n.type, n.title, b.*, ml.* FROM {book} b INNER JOIN {node} n on b.nid = n.nid INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE n.nid IN (". implode(',', $nids) .") AND n.status = 1 ORDER BY ml.weight, ml.link_title"));
while ($link = db_fetch_array($result2)) {
if (!isset($type) || !variable_get('book_restrict_to_types', false) || $link['type'] == $type) {
if (!isset($type) || !variable_get('book_restrict_to_types', false) || $link['type'] == $type || ($type == 'stormdok' && $link['type'] == 'stormproject')) {
$link['href'] = $link['link_path'];
$link['options'] = unserialize($link['options']);
$all_books[$link['bid']] = $link;