Portfolio plugins explicitly requires parent library with superclass definition

I have discovered a bug with GoogleDocs portfolio in events. An event
handler was defined in googledocs/lib.php and so the cron included just
this library. But the inclusion failed because the superclass
portfolio_plugin_push_base was not known to cron.

IMHO it is generally good habit to require_once the file which defines
the parent classes.
This commit is contained in:
David Mudrak 2010-06-27 14:46:15 +00:00
parent e80cfb8438
commit f675815e97
4 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
<?php
require_once($CFG->libdir.'/portfolio/plugin.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/boxlib.php');

View File

@ -1,4 +1,5 @@
<?php
require_once($CFG->libdir.'/portfolio/plugin.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/flickrlib.php');

View File

@ -5,6 +5,7 @@
* @author Dan Poltawski <talktodan@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*/
require_once($CFG->libdir.'/portfolio/plugin.php');
require_once($CFG->libdir.'/googleapi.php');
class portfolio_plugin_googledocs extends portfolio_plugin_push_base {

View File

@ -5,7 +5,7 @@
* @author Dan Poltawski <talktodan@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*/
require_once($CFG->libdir.'/portfolio/plugin.php');
require_once($CFG->libdir.'/googleapi.php');
class portfolio_plugin_picasa extends portfolio_plugin_push_base {