disqus/disqus-wordpress — pull request #83 by tigernsw (2014-08-21 01:07:00+00:00)
Title: Fix the CLI on linux for cron job

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];

}