function tripal_mviews_action

2.x tripal_core.DEPRECATED.api.inc tripal_mviews_action($op, $mview_id, $redirect = FALSE)
3.x tripal_core.DEPRECATED.inc tripal_mviews_action($op, $mview_id, $redirect = FALSE)
1.x tripal_core_mviews.api.inc tripal_mviews_action($op, $mview_id, $redirect = FALSE)

Deprecated

Restructured API to make naming more readable and consistent. Function was deprecated in Tripal 2.0 and will be removed 2 releases from now. This function has been replaced by tripal_refresh_mview(), and tripal_delete_mview().

See also

tripal_refresh_mview() or tripal_delete_mview().

File

tripal_core/api/tripal_core.DEPRECATED.api.inc, line 802
Contains all the deprecated functions to keep the tripal api backwards compatible.

Code

function tripal_mviews_action($op, $mview_id, $redirect = FALSE) {

  if ($op == 'update') {
    tripal_report_error(
    'tripal_deprecated', 
    TRIPAL_NOTICE, 
    "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.", 
    array(
      '%old_function' => 'tripal_mviews_action',
      '%new_function' => 'tripal_refresh_mview'
    )
    );

    //New API Function
    $ret = tripal_refresh_mview($mview_id, $redirect);
    if ($redirect) {
      drupal_goto("admin/tripal/schema/mviews");
    }
    return $ret;
  }
  if ($op == 'delete') {
    tripal_report_error(
    'tripal_deprecated', 
    TRIPAL_NOTICE, 
    "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.", 
    array(
      '%old_function' => 'tripal_mviews_action',
      '%new_function' => 'tripal_delete_mview'
    )
    );

    //New API Function
    $ret = tripal_delete_mview($mview_id, $redirect);
    if ($redirect) {
      drupal_goto("admin/tripal/schema/mviews");
    }
    return $ret;
  }
}