From 40d6bc4825c5f1b88458b1082749a1cdd3bf2937 Mon Sep 17 00:00:00 2001 From: Penny Leach Date: Thu, 19 Nov 2009 07:02:15 +0000 Subject: [PATCH] portfolio NOBUG added some more helpful debugging information about common formats --- lang/en_utf8/portfolio.php | 3 ++- lib/portfolio/exporter.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lang/en_utf8/portfolio.php b/lang/en_utf8/portfolio.php index 3cf2f806e0..0e93ccf4ed 100644 --- a/lang/en_utf8/portfolio.php +++ b/lang/en_utf8/portfolio.php @@ -93,6 +93,7 @@ $string['logs'] = 'Transfer logs'; $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'; @@ -103,7 +104,7 @@ $string['mustsetcallbackoptions'] = 'You must set the callback options either in $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!'; diff --git a/lib/portfolio/exporter.php b/lib/portfolio/exporter.php index ed08e048ad..8935dfedfe 100644 --- a/lib/portfolio/exporter.php +++ b/lib/portfolio/exporter.php @@ -291,7 +291,7 @@ class portfolio_exporter { $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)) { -- 2.39.5