if (isset($_REQUEST['import'])) {
$import = filter_var( $_REQUEST['import'], FILTER_VALIDATE_BOOLEAN );
}
- switch ($import) {
+ switch ( $import ) {
case 'true':
$import_result = '<pre>$_REQUEST: ' . print_r( $_REQUEST, true ) . '</pre>';
$db_host = filter_var( $_REQUEST['db_host'], FILTER_SANITIZE_STRING );
)
);
$import_result .= '<pre>$this->settings: ' . print_r($this->settings, true) . '</pre>';
- $this->clearData();
- $this->addCategories();
+ // $this->clearData();
+ // $this->addCategories();
$import_result .= '<pre>$this->categories: ' . print_r($this->categories, true) . '</pre>';
$import_result .= $this->addEvents();
$get_file_data = $this->dbh->prepare($prepare_sql);
}
//$sql .=" AND file != '' ";
- //$sql .= " AND id = 2838";
+ $sql .= " AND id > 7131";
$this->wpdb->show_errors();
//echo '<pre>$sql: ' . print_r($sql, true) . '</pre>';
try {
}
if ( $old_event_format ) {
$intro = substr( strip_tags( $event['descr'] ), 0, 150 );
+ $url = substr( $event['url'], 0, 200 );
// Remove uneeded newlines from both intro and description
$intro = preg_replace( "/\s\s+/", ' ', $intro );
$descr = preg_replace( "/\s\s+/", ' ', $event['descr'] );
'file1' => $event['file'],
'file1_descr' => $event['filename'],
'cost' => $event['cost'],
- 'url' => $event['url'],
+ 'url' => $url,
'old_event_id' => $event['id'],
// 'ref_type' => $refType,
'ref_type' => 10,