Reply New Topic
2011/10/18 0:36:28
#1
Offline
Home away from home

ACP > module > akctions

Hello,

I created a module with an object and fields. This module works fine.

After them I modified this module and added some INSERTS as default. I want, that the user can not delete this values. Therefore I modified the array for "$valid_op" and removed the "del" and "add" array from the code.

But in the ACP of the module is the button for "delete" in the actions available.

Is this a core bug?

_________________
http://on.fb.me/x5lEdX

2011/10/18 9:35:22
#2
Offline
Home away from home

Re: ACP > module > akctions

This is not how it works. You need to specify the valid operations in the table constructor.

_________________
the german icms website : www.impresscms.de

2011/10/18 9:57:57
#3
Offline
Webmaster

Re: ACP > module > akctions

yes, it's not because something doesn't work as expected, that it is a core bug

_________________

Me on Ohloh


2011/10/18 16:29:31
#4
Offline
Home away from home

Re: ACP > module > akctions

The $valid_op array is for filtering actions from POST and GET actions, not for determining the methods available for the object.

The instantiation of the IPF table object allows you to specify the actions and has defaults of 'edit' and 'delete', if none are specified

from libraries/icms/ipf/view/Table.php --

/** * Constructor * * @param object $objectHandler {@link icms_ipf_Handler} * @param array $columns array representing the columns to display in the table * @param object $criteria * @param array $actions array representing the actions to offer * * @return array */ public function __construct(&$objectHandler, $criteria = false, $actions = array('edit', 'delete'), $userSide = false) {


The core is functioning properly, in this case.

_________________
Christian Web Resources
Facebook

Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.