Drupal API

_node_access_join_sql

  • Drupal 5
  • Drupal 6
Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/node/node.module, строка 2072

Версии
5 – 6
_node_access_join_sql($node_alias = 'n', $node_access_alias = 'na')

Generate an SQL join clause for use in fetching a node listing.

Параметры

$node_alias If the node table has been given an SQL alias other than the default 'n', that must be passed here.

$node_access_alias If the node_access table has been given an SQL alias other than the default 'na', that must be passed here.

Возвращаемое значение

An SQL join clause.

Связанные темы

▸ 1 функция вызывает _node_access_join_sql()

▾ 1 функция вызывает _node_access_join_sql()

node_db_rewrite_sql in modules/node/node.module
Реализация hook_db_rewrite_sql().

Код

<?php
function _node_access_join_sql($node_alias = 'n', $node_access_alias = 'na') {
  if (user_access('administer nodes')) {
    return '';
  }
  return 'INNER JOIN {node_access} '. $node_access_alias .' ON '. $node_access_alias .'.nid = '. $node_alias .'.nid';
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему

Что такое OpenID?
  • Регистрация
  • Забыли пароль?

Документация

  • Drupal 6
  • Константы
  • Файлы
  • Функции
  • Глобальные переменные
  • Разделы