Example #1
0
 /**
  * Stop process on SQL Error, print and log error, removes the new blog
  * @since 0.2.0
  * @param  string  $sql_query the query
  * @param  string  $sql_error the error
  */
 public static function sql_error($sql_query, $sql_error)
 {
     $error_1 = 'ERROR SQL ON : ' . $sql_query;
     MUCD_Duplicate::write_log($error_1);
     $error_2 = 'WPDB ERROR : ' . $sql_error;
     MUCD_Duplicate::write_log($error_2);
     MUCD_Duplicate::write_log('Duplication interrupted on SQL ERROR');
     echo '<br />Duplication failed :<br /><br />' . $error_1 . '<br /><br />' . $error_2 . '<br /><br />';
     if ($log_url = MUCD_Duplicate::log_url()) {
         echo '<a href="' . $log_url . '">' . MUCD_NETWORK_PAGE_DUPLICATE_VIEW_LOG . '</a>';
     }
     MUCD_Functions::remove_blog(self::$to_site_id);
     wp_die();
 }
Example #2
0
 /**
  * Stop process on Creating dir Error, print and log error, removes the new blog
  * @since 0.2.0
  * @param  string  $dir_path the path
  */
 public static function mkdir_error($dir_path)
 {
     $error_1 = 'ERROR DURING FILE COPY : CANNOT CREATE ' . $dir_path;
     MUCD_Duplicate::write_log($error_1);
     $error_2 = sprintf(MUCD_NETWORK_PAGE_DUPLICATE_COPY_FILE_ERROR, MUCD_Functions::get_primary_upload_dir());
     MUCD_Duplicate::write_log($error_2);
     MUCD_Duplicate::write_log('Duplication interrupted on FILE COPY ERROR');
     echo '<br />Duplication failed :<br /><br />' . $error_1 . '<br /><br />' . $error_2 . '<br /><br />';
     if ($log_url = MUCD_Duplicate::log_url()) {
         echo '<a href="' . $log_url . '">' . MUCD_NETWORK_PAGE_DUPLICATE_VIEW_LOG . '</a>';
     }
     MUCD_Functions::remove_blog(self::$to_site_id);
     wp_die();
 }