more debugging
This commit is contained in:
parent
b643630a39
commit
f749a0f0ea
|
@ -40,8 +40,8 @@ function gcal_import_worker()
|
|||
|
||||
global $wpdb;
|
||||
$table = $wpdb->prefix.GCAL_TABLE;
|
||||
$structure = "SELECT gcal_category from $table ;";
|
||||
$categories = $wpdb->query($structure);
|
||||
$query = "SELECT gcal_category from $table ;";
|
||||
$categories = $wpdb->query($query);
|
||||
$file = dirname (__FILE__) . '/categories.txt';
|
||||
file_put_contents ($file, var_dump ($categories));
|
||||
/*
|
||||
|
@ -59,8 +59,8 @@ include ('CalFileParser.php');
|
|||
function gcal_import_process_category($category) {
|
||||
global $wpdb;
|
||||
$table = $wpdb->prefix.GCAL_TABLE;
|
||||
$structure = "SELECT gcal_link from $table WHERE gcal_category = '$category' AND gcal_active = '1' ;";
|
||||
$link = $wpdb->query($structure);
|
||||
$query = "SELECT gcal_link from $table WHERE gcal_category = '$category' AND gcal_active = '1' ;";
|
||||
$link = $wpdb->query($query);
|
||||
error_log ("found active link $link for category $category");
|
||||
$cal = new CalFileParser();
|
||||
// will this also work with a proxy? After all, it does a file_get_contents internally.
|
||||
|
|
|
@ -42,7 +42,7 @@ define ('GCAL_TABLE', 'gcal_import');
|
|||
*/
|
||||
|
||||
// The real work goes here.
|
||||
require_once dirname( __FILE__ ) . "/gcal-import-worker.php";
|
||||
include dirname( __FILE__ ) . "/gcal-import-worker.php";
|
||||
add_action( 'gcal_import_worker_hook', 'gcal_import_worker' );
|
||||
|
||||
|
||||
|
|
Reference in a new issue