Jump to content


Issue information

  • #035090

  • Confirmed - General

  • 2.1.0 Beta 3

  • -

  • 4 - High


Issue Confirmations

  • Yes (2)No (0)
Photo

tracker_custom_field_permissions

Posted by tenaki on 15 December 2011 - 03:23 PM

Fatal error: Cannot redeclare class tracker_custom_field_permissions in /home/content/p/h/o/photoman/html/forumtest/admin/applications_addon/ips/tracker/modules/custom/fields_public/custom.php on line 577

When trying to save any custom field

I'm sure you'll want a better name, but this patch does fix the issue:
--- custom.php.orig 2012-01-28 15:26:12.507492044 -0700
+++ custom.php 2012-01-28 13:56:55.449493327 -0700
@@ -388,7 +388,7 @@

   if ( ! is_object( $this->permsLib ) )
   {
-   $this->permsLib = new tracker_custom_field_permissions( $this->registry );
+   $this->permsLib = new tracker_custom_field_permissions2( $this->registry );
   }

   $out = $this->permsLib;
@@ -540,7 +540,7 @@
  }
}

-class tracker_custom_field_permissions extends classPublicPermissions
+class tracker_custom_field_permissions2 extends classPublicPermissions
{
  /**
  * Check a custom field permission, can't use default IPB


changed status to: Confirmed - General

Issue is caused by a tracker_custom_field_permissions class existing in both:

admin/applications_addon/ips/tracker/modules/custom/fields_admin/custom.php
admin/applications_addon/ips/tracker/modules/custom/fields_public/custom.php

Multiple ways to handle this but best way I can think of is for it to be moved into it's own source file that is called by both classes when needed.






0 user(s) are reading this issue

0 members, 0 guests, 0 anonymous users