# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- C:\wamp\www\drupal-6.6\sites\all\modules\nodeadmin\nodeadmin.module
+++ C:\Documents and Settings\JSCL\My Documents\Descargas\nodeadmin\nodeadmin.module
@@ -17,15 +17,8 @@
* Implementation of hook_perm().
*/
function nodeadmin_perm() {
-
- $ctypes = node_get_types();
- $permissions = array();
- $permissions[] = 'access content administration';
- foreach ($ctypes as $ctype => $cdata) {
- $permissions[] = 'view '.$cdata->type;
+ return array('access content administration');
}
- return $permissions;
-}
/**
* Implementation of hook_menu().
@@ -78,22 +71,25 @@
$types = array();
$ctypes = node_get_types();
foreach ($ctypes as $ctype => $cdata) {
- if(user_access('view '.$cdata->type))
$types[$ctype] = $cdata->name;
}
// generate content administration page
- $output = '
 .'/icons/doc-option-add.png)
Add new content by type:
';
$results = array();
nodeadmin_ajax_query($results);
@@ -104,9 +100,9 @@
if (is_array($node_data) && count($node_data)) {
foreach ($node_data as $nid => $node) {
$links = '';
- $links .= "

";
- $links .= "

";
- $links .= "

";
+ $links .= "

";
+ $links .= "

";
+ $links .= "

";
$row = array(
array(
'data' => $links,
@@ -221,29 +217,7 @@
$qwheres[] = 'u.name = "%s" ';
$args[] = check_plain($options['filterUser']);
}
-
- $counter = 0;
- $where_types = '';
- $ctypes = node_get_types();
- $types = array();
- foreach ($ctypes as $ctype => $cdata) {
- if(user_access('view '.$cdata->type)){
- if($counter == 1)
- {
- $where_types .= ' OR ';
- }
-
- $where_types .= ' n.type=\''.$cdata->type.'\'';
- $counter = 1;
- }
- }
- if(!empty($where_types))
- $qwhere = 'WHERE ('.$where_types.') ';
- //Setting what can be seen
if (count($qwheres)) {
- if(!empty($where_types))
- $qwhere = 'WHERE ('.$where_types.') AND '. join('AND ', $qwheres) .' ';
- else
$qwhere = 'WHERE '. join('AND ', $qwheres) .' ';
}