Esempio n. 1
0
 /**
  * Delete synch. records, instances and links that refer to missing or invalid items.
  * 
  * @return void
  */
 function blc_cleanup_database()
 {
     global $blclog;
     //Delete synch. records for container types that don't exist
     $blclog->info('... Deleting invalid container records');
     blcContainerHelper::cleanup_containers();
     //Delete invalid instances
     $blclog->info('... Deleting invalid link instances');
     blc_cleanup_instances();
     //Delete orphaned links
     $blclog->info('... Deleting orphaned links');
     blc_cleanup_links();
 }
Esempio n. 2
0
 /**
  * Perform various database maintenance tasks on the plugin's tables.
  * 
  * Removes records that reference disabled containers and parsers,
  * deletes invalid instances and links, optimizes tables, etc.
  * 
  * @return void
  */
 function database_maintenance()
 {
     blcContainerHelper::cleanup_containers();
     blc_cleanup_instances();
     blc_cleanup_links();
     blcUtility::optimize_database();
 }