Closed (fixed)
Project:
Disqus
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2013 at 12:07 UTC
Updated:
4 Jul 2013 at 13:10 UTC
Jump to comment: Most recent file
A correct message will hopefully avoid people wasting their time. If the API is missing, the message should be displayed accordingly!
/**
* When exporting via the API, make sure the user filled out the necessary info
*/
function _disqus_migrate_export_api_validate($form, &$form_state) {
// Check for existance of Disqus API
if (!file_exists('sites/all/libraries/disqusapi/disqusapi.php')) {
form_set_error('', t('Your secret key must be entered before using this export functionality. Please get your application API keys from Disqus and enter them in the "Advanced" fieldset below. Also ensure that you have authenticated with Disqus.'));
}
// Make sure secret key is filled out
$api_secret = variable_get('disqus_secretkey','');
if (empty($api_secret)) {
form_set_error('', t('Your secret key must be entered before using this export functionality. Please get your application API keys from Disqus and enter them in the "Advanced" fieldset on the settings page.'));
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | disqus-incorrect-msg-for-missing-api-1948960.patch | 1.03 KB | dakku |
Comments
Comment #1
dakku commentedpatch
Comment #2
dakku commentedAny ideas if this Patch can be added?
Comment #3
slashrsm commentedCommitted. Thanks.