re-added temporarly translate_perms
This commit is contained in:
		
							
								
								
									
										29
									
								
								sites/all/modules/gui/translate_perms/translate_perms.info
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								sites/all/modules/gui/translate_perms/translate_perms.info
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
name = Translate Perms
 | 
			
		||||
description = "The description of this module"
 | 
			
		||||
 | 
			
		||||
; Core version (required)
 | 
			
		||||
core = 7.x
 | 
			
		||||
 | 
			
		||||
; Package name (see http://drupal.org/node/542202 for a list of names)
 | 
			
		||||
; package = 
 | 
			
		||||
 | 
			
		||||
; PHP version requirement (optional)
 | 
			
		||||
; php = 5.2
 | 
			
		||||
 | 
			
		||||
; Loadable code files
 | 
			
		||||
; files[] = translate_perms.module
 | 
			
		||||
; files[] = translate_perms.admin.inc
 | 
			
		||||
; files[] = translate_perms.class.inc
 | 
			
		||||
 | 
			
		||||
; Module dependencies
 | 
			
		||||
; dependencies[] = mymodule
 | 
			
		||||
; dependencies[] = theirmodule (1.2)
 | 
			
		||||
; dependencies[] = anothermodule (>=2.4)
 | 
			
		||||
; dependencies[] = views (3.x)
 | 
			
		||||
 | 
			
		||||
; Configuration page
 | 
			
		||||
; configure = admin/config/translate_perms
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
; For further information about configuration options, see
 | 
			
		||||
; - http://drupal.org/node/542202
 | 
			
		||||
							
								
								
									
										92
									
								
								sites/all/modules/gui/translate_perms/translate_perms.module
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								sites/all/modules/gui/translate_perms/translate_perms.module
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,92 @@
 | 
			
		||||
<?php
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * This is the file description for Translate Perms module.
 | 
			
		||||
 *
 | 
			
		||||
 * In this more verbose, multi-line description, you can specify what this
 | 
			
		||||
 * file does exactly. Make sure to wrap your documentation in column 78 so
 | 
			
		||||
 * that the file can be displayed nicely in default-sized consoles.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Implements hook_permission().
 | 
			
		||||
 */
 | 
			
		||||
function translate_perms_permission() {
 | 
			
		||||
  return array(
 | 
			
		||||
    'access_translations_overview' =>  array(
 | 
			
		||||
      'title' => t('Access translations overview')
 | 
			
		||||
    ),
 | 
			
		||||
 | 
			
		||||
		'access_translation_table_fields' =>  array(
 | 
			
		||||
		  'title' => t('Access translation Fields table')
 | 
			
		||||
		),
 | 
			
		||||
		'access_translation_table_content_type' =>  array(
 | 
			
		||||
		  'title' => t('Access translation Content types table')
 | 
			
		||||
		),
 | 
			
		||||
		'access_translation_table_menu' =>  array(
 | 
			
		||||
		  'title' => t('Access translation menu table')
 | 
			
		||||
		),
 | 
			
		||||
		'access_translation_table_taxonomy' =>  array(
 | 
			
		||||
		  'title' => t('Access translation taxonomy table')
 | 
			
		||||
		),
 | 
			
		||||
	
 | 
			
		||||
		'translate_strings' =>  array(
 | 
			
		||||
      'title' => t('Translate strings')
 | 
			
		||||
    ),
 | 
			
		||||
    'import_translations' =>  array(
 | 
			
		||||
      'title' => t('Import translations')
 | 
			
		||||
    ),
 | 
			
		||||
    'refresh_strings' =>  array(
 | 
			
		||||
      'title' => t('Refresh strings')
 | 
			
		||||
    ),
 | 
			
		||||
    'update_modules_translations' =>  array(
 | 
			
		||||
      'title' => t('Update modules translations')
 | 
			
		||||
    ),
 | 
			
		||||
    'export_translations' =>  array(
 | 
			
		||||
      'title' => t('Import translations')
 | 
			
		||||
    ),
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Implements hook_menu_alter().
 | 
			
		||||
 */
 | 
			
		||||
function translate_perms_menu_alter(&$items) {
 | 
			
		||||
 | 
			
		||||
  if(isset($items['admin/config/regional/translate']))
 | 
			
		||||
		$items['admin/config/regional/translate']['access arguments'] = array('access_translations_overview');
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
	if(isset($items['admin/config/regional/translate/table']))
 | 
			
		||||
		$items['admin/config/regional/translate/table']['access arguments'] = array('access_translation_table_fields');
 | 
			
		||||
	
 | 
			
		||||
	if(isset($items['admin/config/regional/translate/table/nodetype']))
 | 
			
		||||
		$items['admin/config/regional/translate/table/nodetype']['access arguments'] = array('access_translation_table_content_type');
 | 
			
		||||
 | 
			
		||||
 	if(isset($items['admin/config/regional/translate/table/menu']))
 | 
			
		||||
		$items['admin/config/regional/translate/table/menu']['access arguments'] = array('access_translation_table_menu');
 | 
			
		||||
 | 
			
		||||
 	if(isset($items['admin/config/regional/translate/table/taxonomy']))
 | 
			
		||||
		$items['admin/config/regional/translate/table/taxonomy']['access arguments'] = array('access_translation_table_taxonomy');
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  if(isset($items['admin/config/regional/translate/translate']))
 | 
			
		||||
		$items['admin/config/regional/translate/translate']['access arguments'] = array('translate_strings');
 | 
			
		||||
		
 | 
			
		||||
  if(isset($items['admin/config/regional/translate/import']))
 | 
			
		||||
		$items['admin/config/regional/translate/import']['access arguments'] = array('import_translations');
 | 
			
		||||
 | 
			
		||||
  if(isset($items['admin/config/regional/translate/i18n_string']))
 | 
			
		||||
		$items['admin/config/regional/translate/i18n_string']['access arguments'] = array('refresh_strings');
 | 
			
		||||
 | 
			
		||||
  if(isset($items['admin/config/regional/translate/update']))
 | 
			
		||||
		$items['admin/config/regional/translate/update']['access arguments'] = array('update_modules_translations');
 | 
			
		||||
 | 
			
		||||
  if(isset($items['admin/config/regional/translate/export']))
 | 
			
		||||
		$items['admin/config/regional/translate/export']['access arguments'] = array('export_translations');
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user