/** * Migrates the table. * * @return void * @author Jonas Björk */ function jb_plugin_ngg_migrate($old, $new) { $schema = jb_plugin_ngg_schema(); jb_table_migrate($old, $new, 'ngg_album', $schema['ngg_album']); jb_table_migrate($old, $new, 'ngg_gallery', $schema['ngg_gallery']); jb_table_migrate($old, $new, 'ngg_pictures', $schema['ngg_pictures']); }
/** * Migrates the table. * * @return void * @author Jonas Björk */ function jb_plugin_poll_migrate($old, $new) { $schema = jb_plugin_poll_schema(); jb_table_migrate($old, $new, 'pollsa', $schema['pollsa']); jb_table_migrate($old, $new, 'pollsip', $schema['pollsip']); jb_table_migrate($old, $new, 'pollsq', $schema['pollsq']); }
/** * Migrates the table. * * @return void * @author Jonas Björk */ function jb_plugin_pt_migrate($old, $new) { $schema = jb_plugin_pt_schema(); jb_table_migrate($old, $new, 'pt_templates', $schema['pt_templates']); }
// TODO: fixa kontroll av detta! if (DB_USE) { $url = jb_get_url($blog); } if (DB_USE) { $new_id = jb_create_blog($blog, $url); } if (!DB_USE) { $new_id = 7676; } if ($new_id > 0) { printf("%d) %s - %s\n", $new_id, $blog, $url); if ($new_id > 0) { foreach ($wpcore as $w) { if (DB_USE) { jb_table_migrate($blog, $new_id, $w, $schema[$w]); } } // some plugin handling foreach ($plugins as $p) { $f_find = sprintf("jb_plugin_%s_find", $p['name']); $f_create = sprintf("jb_plugin_%s_create", $p['name']); $f_migrate = sprintf("jb_plugin_%s_migrate", $p['name']); if (function_exists($f_find)) { if ($f_find($blog)) { if (function_exists($f_create)) { if ($f_create($new_id)) { if (function_exists($f_migrate)) { $f_migrate($blog, $new_id); } else { printf("Could not find function: %s\n", $f_migrate);
/** * Migrates the table. * * @return void * @author Jonas Björk */ function jb_plugin_popularpostsdata_migrate($old, $new) { $schema = jb_plugin_popularpostsdata_schema(); jb_table_migrate($old, $new, 'popularpostsdata', $schema['popularpostsdata']); }
/** * Migrates the table. * * @return void * @author Jonas Björk */ function jb_plugin_rg_migrate($old, $new) { $schema = jb_plugin_rg_schema(); jb_table_migrate($old, $new, 'rg_form', $schema['rg_form']); jb_table_migrate($old, $new, 'rg_form_meta', $schema['rg_form_meta']); jb_table_migrate($old, $new, 'rg_form_view', $schema['rg_form_view']); jb_table_migrate($old, $new, 'rg_lead', $schema['rg_lead']); jb_table_migrate($old, $new, 'rg_lead_detail', $schema['rg_lead_detail']); jb_table_migrate($old, $new, 'rg_lead_detail_long', $schema['rg_lead_detail_long']); jb_table_migrate($old, $new, 'rg_lead_notes', $schema['rg_lead_notes']); }