deleted materio_title_access module files

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy 2013-06-01 20:41:18 +02:00
parent 5fd46660b9
commit 7c486da7c5
2 changed files with 0 additions and 75 deletions

View File

@ -1,29 +0,0 @@
name = Materio title access
description = "Materio title access"
; Core version (required)
core = 7.x
; Package name (see http://drupal.org/node/542202 for a list of names)
package = Materio
; PHP version requirement (optional)
; php = 5.2
; Loadable code files
;files[] = materio_search_api.theme.inc
;files[] = materio_search_api.forms.inc
;files[] = materio_search_api.pages.inc
;files[] = materio_search_api.admin.inc
files[] = materio_title_access.module
; Module dependencies
;dependencies[] = taxonomy
;dependencies[] = search_api
dependencies[] = title
; Configuration page
; configure = admin/config/materiobasemod
; For further information about configuration options, see
; - http://drupal.org/node/542202

View File

@ -1,46 +0,0 @@
<?php
// /**
// * Implements hook_permission().
// */
// function materio_title_access_permission() {
// $perms = array();
// $entity_infos = entity_get_info();
// foreach ($entity_infos['node']['bundles'] as $bundle => $value) {
// $perms['show '.$bundle.' title'] = array(
// 'title' => t('Show !bundle node title.', array('!bundle'=>$value['label'])),
// );
// }
// return $perms;
// }
// /**
// * Implements hook_field_access().
// */
// function materio_title_access_field_access($op, $field, $entity_type, $entity, $account) {
// if($field['field_name'] == 'title_field' && $entity_type == 'node' && isset($entity->type)){
// return user_access('show '.$entity->type.' title');
// }
// return TRUE;
// }
// function materio_title_access_preprocess_html(&$vars){
// // dsm($vars, '$vars');
// if (arg(0) == 'node' && $node = node_load(arg(1))) {
// if(!user_access('show '.$node->type.' title')){
// if($node->type == "materiau"){
// $title = field_get_items('node', $node, 'field_nature_titre');
// $vars['head_title_array']['title'] = $title[0]['safe_value'];
// }else{
// $vars['head_title_array']['title'] = 'restricted access';
// }
// $vars['head_title'] = implode(' | ', $vars['head_title_array']);
// // dsm($vars, 'vars');
// }
// }
// }