Skip to content

Commit

Permalink
portfolio NOBUG added some more helpful debugging information about c…
Browse files Browse the repository at this point in the history
…ommon formats
  • Loading branch information
Penny Leach committed Nov 19, 2009
1 parent add93b8 commit 40d6bc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lang/en_utf8/portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
$string['logsummary'] = 'Previous successful transfers';
$string['manageportfolios'] = 'Manage portfolios';
$string['manageyourportfolios'] = 'Manage your portfolios';
$string['mimecheckfail'] = 'The portfolio plugin $a->plugin doesn\'t support that mimetype $a->mimetype';
$string['missingcallbackarg'] = 'Missing callback argument $a->arg for class $a->class';
$string['moderatefilesizethreshold'] = 'Moderate transfer filesize';
$string['moderatefilesizethresholddesc'] = 'Filesizes over this threshold will be considered to take a moderate amount of time to transfer';
Expand All @@ -103,7 +104,7 @@
$string['noavailableplugins'] = 'Sorry, but there are no available portfolios for you to export to';
$string['nocallbackfile'] = 'Something in the module you\'re trying to export from is broken - couldn\'t find a required file ($a)';
$string['nocallbackclass'] = 'Could not find the callback class to use ($a)';
$string['nocommonformats'] = 'No common formats between any available portfolio plugin and the calling location $a';
$string['nocommonformats'] = 'No common formats between any available portfolio plugin and the calling location $a->location (caller supported $a->formats)';
$string['noclassbeforeformats'] = 'You must set the callback class before calling set_formats in portfolio_button';
$string['noinstanceyet'] = 'Not yet selected';
$string['nologs'] = 'There are no logs to display!';
Expand Down
2 changes: 1 addition & 1 deletion lib/portfolio/exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public function process_stage_config() {
$expectedtime = $this->instance->expected_time($this->caller->expected_time());
if (count($formats) == 0) {
// something went wrong, we should not have gotten this far.
throw new portfolio_export_exception($this, 'nocommonformats', 'portfolio', null, get_class($this->caller));
throw new portfolio_export_exception($this, 'nocommonformats', 'portfolio', null, array('location' => get_class($this->caller), 'formats' => implode(',', $formats)));
}
// even if neither plugin or caller wants any config, we have to let the user choose their format, and decide to wait.
if ($pluginobj || $callerobj || count($formats) > 1 || ($expectedtime != PORTFOLIO_TIME_LOW && $expectedtime != PORTFOLIO_TIME_FORCEQUEUE)) {
Expand Down

0 comments on commit 40d6bc4

Please sign in to comment.