You are here

function uc_product_update_7000 in Ubercart 7.3

Renames node permissions for the Product type.

File

uc_product/uc_product.install, line 259
Install, update and uninstall functions for the uc_product module.

Code

function uc_product_update_7000() {
  db_update('role_permission')
    ->fields(array(
    'permission' => 'create product products',
  ))
    ->condition('permission', 'create products')
    ->execute();
  db_update('role_permission')
    ->fields(array(
    'permission' => 'edit own product products',
  ))
    ->condition('permission', 'edit own products')
    ->execute();
  db_update('role_permission')
    ->fields(array(
    'permission' => 'edit all product products',
  ))
    ->condition('permission', 'edit all products')
    ->execute();
  db_update('role_permission')
    ->fields(array(
    'permission' => 'delete own product products',
  ))
    ->condition('permission', 'delete own products')
    ->execute();
  db_update('role_permission')
    ->fields(array(
    'permission' => 'delete all product products',
  ))
    ->condition('permission', 'delete all products')
    ->execute();
  return t('Renamed node permissions for the Product type.');
}