Port to D6

seutje - March 31, 2009 - 13:49
Project:Title Permissions
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:spiderman
Status:active
Issue tags:port to D6
Description

ported this module to D6, cleaned up the coding style (trailing spaces mostly) while I was at it

u can find it at http://www.seutje.be/mine/title_perms-6.x-1.x-dev.tar.gz

I'll try and make a patch to head, but something tells me this module is abandoned

#1

spiderman - May 28, 2009 - 16:26
Assigned to:Anonymous» spiderman

Found a use for this module, and decided to roll a patch against the DRUPAL-5 release, even though (as noted above) it appears to be abandoned.

It should be noted that the title editing restrictions fails if you are using the content_profile module, but a small tweak to the logic in the hook_form_alter fixes this nicely:

<?php
--- title_perms.module  (revision 396)
+++
title_perms.module  (working copy)
@@ -
35,6 +35,8 @@
  
//we want to make sure we are editing not adding a node
  
if (arg(0) == 'node' && is_numeric(arg(1))) {
    
$nodeid = arg(1);
+  } else if (
arg(0) == 'user' && arg(3) == 'profile') {
+   
$nodeid = arg(1);
   }
   if (
$perms != NULL && substr_count($form_id, '_node_form') > 0 && $nodeid != NULL) {
    
$key = trim(str_replace('_node_form', "", $form_id));
?>

AttachmentSize
title_perms.d6.patch 22.97 KB

#2

spiderman - May 28, 2009 - 16:27
 
 

Drupal is a registered trademark of Dries Buytaert.