The Joomla! Forum ™





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Tue Nov 03, 2009 4:59 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Apr 19, 2007 3:46 pm
Posts: 54
Hi,

maybe someone already proposed it (or maybe it is just useless stuff...i dont know)...

I have the need to store in some way the last update date of a module, but unfortunately Joomla module component is not storing it in any place...
I thought I could resolve this by using plugin system...but happened to discover there are not event triggers after JController execute method returns...after that joomla core module component does a redirect and I lose all parametr passed in the previous page request...

So my idea is to create one event trigger before the controller task executes and one after it executed...
This can be achieved by inserting proper code in JController execute method:

Code:
      // Make sure we have access
      if ($this->authorize( $doTask ))
      {
         // trigger onBeforeTask event
         // ....
         $retval = $this->$doTask();
         // trigger onAfterTask event
         // ....
         return $retval;
      }


I think many extensions could benefit from this (for example logging plugins)...
Performances would be affected in terms of two event trigger calls for page request (as far as I know JController execute only once for page request).

What do you think about this proposal?
Is there a simpler way to achieve this kind of results?

Thanks,
Cristiano


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group