Jump to content

Server Module - Always calling module_ClientArea function?


flosoft

Recommended Posts

Hi,

 

I'm currently working on a server module and noticed that for some reason the main "modulename_ClientArea" function gets called every time, even on the other pages that wouldn't need the functions values.

 

As a result, all the delay that happens in the modulename_ClientArea function gets added to every other page.

 

Is that the way it's supposed to be?

Link to comment
Share on other sites

I'm not seeing that on my dev install of 5.2 with a server module. I tested by doing a module log call in the clientarea function and it only does an entry when viewing the service details. It does not run when viewing clientarea.php, home, or other pages.

 

Do you have a hook somewhere that is calling the module's clientarea?

Link to comment
Share on other sites

So, I am running for example this code in my 5.2.7 install.

 


function flosoftdedicated_ClientArea($params) {
	// Debug print.
	echo '<pre>' . htmlspecialchars( print_r(debug_backtrace(), true) ) . '</pre>';
....

 

This will run on any of the module subpages, like flosoftdedicated_page2 ....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated