Skip to content

Commit

Permalink
Portfolio plugins explicitly requires parent library with superclass …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
mudrd8mz committed Jun 27, 2010
1 parent e80cfb8 commit f675815
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions portfolio/boxnet/lib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
require_once($CFG->libdir.'/portfolio/plugin.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/boxlib.php');

Expand Down
1 change: 1 addition & 0 deletions portfolio/flickr/lib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
require_once($CFG->libdir.'/portfolio/plugin.php');
require_once($CFG->libdir.'/filelib.php');
require_once($CFG->libdir.'/flickrlib.php');

Expand Down
1 change: 1 addition & 0 deletions portfolio/googledocs/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @author Dan Poltawski <[email protected]>
* @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 {
Expand Down
2 changes: 1 addition & 1 deletion portfolio/picasa/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @author Dan Poltawski <[email protected]>
* @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 {
Expand Down

0 comments on commit f675815

Please sign in to comment.