Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the CLI on linux for cron job #83

Open
wants to merge 136 commits into
base: update-count
Choose a base branch
from
Open

Fix the CLI on linux for cron job #83

wants to merge 136 commits into from

Conversation

tigernsw
Copy link

There is a bug in disqus-comment-system/lib/wp-cli.php, it doesn't work if you using linux command line.

Here is the fix, from line 27:
if ($_SERVER['SCRIPT_FILENAME']){
if (substr($_SERVER['SCRIPT_FILENAME'], 0, 1) != '/') {
$script_path = $_SERVER['PWD'] . $_SERVER['SCRIPT_FILENAME'];

     } else {
    $script_path = $_SERVER['SCRIPT_FILENAME'];

}
 }else if ( count($_SERVER["argv"])) { // for cron calls
    $script_path = $_SERVER["argv"][0];

}

norcross and others added 30 commits November 7, 2013 15:31
Load count.js from shortname.disqus.com
Our sites always failed to "Export comments to Disqus". After inspection, I found that the connection was timeout.
Change default timeout of 5 seconds to 60 seconds so that imports from t...
Incrase HTTP request timeout to 60s
updated manage panel to work on SSL
replace curly bracket with %s to fix $wpdb->prepare() debug error
WordPress 3.5 removed the return by ref on the get_post call, and it
isn't needed to begin with.

Fixes #55, #60
Add the ability to add javascript callbacks using 'disqus_config' action
Don't assume my plugins dir is in my WP_CONTENT_DIR.
use plugins_url instead of wp constant
DSQ_PLUGIN_URL uses WP_PLUGIN_URL
This also fixes formatting for debug information
In short, we don't know where the plugin will live, so we can't
hardcode the URL.

Fixes #74
Use `plugins_url()` instead of hardcoding the URL for assets.
Jeroen Ooms and others added 30 commits August 4, 2015 14:21
Bugfix: Use get_comment_author_url() for if statement
Use new constructor style to prevent deprecated notice on PHP7
Fixes an issue where query can become unset on some sites, resulting in
a 404 page after upgrading the database
checking if parentNode is an anchor tag before attempting to access the ...
check if dsq_sync_forum is already scheduled before scheduling it
Check if dsq_sync_forum is already scheduled before scheduling it
Updated product info.
Update plugin description page
Updated screenshots and added FAQ section
Override it like so:
// Filter Disqus' sync timeout
function disqus_sync_timeout($parameter)
{
    return 60;
}
add_filter('disqus_sync_timeout', 'disqus_sync_timeout');
Override like so:
// Filter Disqus' memory limit
function disqus_memory_limit($parameter)
{
    return "1024M";
}
add_filter('disqus_memory_limit', 'disqus_memory_limit');
Filters to allow overriding DISQUS_SYNC_TIMEOUT and memory_limit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.