If I try calling my own functions within init() of a block it would appear that this prevents install.php being called.
I have a custom block that I want to brand depending on some values set by the administrator. I want to set these by calling my own function within init() as the block could be branded with several different values. In 1.9x These functions worked fine as the default inserts were within the statements tags in the install.xml but in 2.0 it's all moved to install.php.
If I run the code below, the install.php is completely missed. Anyone else notice this?
include_once(myfunctions.php);
class block_myblock extends block_base {
function init() {
global $CFG, $DB, $USER;
callmyownfunction();
}
}
However if I comment out my own function call from the init() then the install.php is called and the tables all set up. The include file is loaded because once the tables are setup the functions works fine.
I understood that the init() was called after the install.xml and install.php if they are present.
Any ideas as I'm at a loss after about a week. It's the same on wamp and IIS fastcgi which makes me think might be a Moodle2 issue.