diff --git a/print_mail/print_mail.install b/print_mail/print_mail.install index 9dcacbaad41621392ff7438b31e5be91ac7a5afe..c0766a60d2ad5c16ca3f61aaac66de9ede114cf7 100644 --- a/print_mail/print_mail.install +++ b/print_mail/print_mail.install @@ -249,3 +249,19 @@ function print_mail_update_6003() { menu_rebuild(); return $ret; } + +/** + * Update to version 6.x-1.8 + */ +function print_mail_update_6004() { + // add new 'access send to friend' permission to any role which has 'access print' + $ret = array(); + $dbret = db_query('SELECT * FROM {permission}'); + while ($role = db_fetch_object($dbret)) { + if ((strpos($role->perm, 'access print') !== FALSE)) { + $role->perm = 'access send to friend, ' . $role->perm; + $ret[] = update_sql("UPDATE {permission} SET perm = '$role->perm' WHERE rid = $role->rid"); + } + } + return $ret; +} diff --git a/print_pdf/print_pdf.install b/print_pdf/print_pdf.install index db9ef036325afa6099bef5d8d1cd4b0eeb9fd338..5445d6d3b6124f723bd5a180ab57da1d475e53a1 100644 --- a/print_pdf/print_pdf.install +++ b/print_pdf/print_pdf.install @@ -224,3 +224,19 @@ function print_pdf_update_6003() { menu_rebuild(); return $ret; } + +/** + * Update to version 6.x-1.8 + */ +function print_pdf_update_6004() { + // add new 'access PDF version' permission to any role which has 'access print' + $ret = array(); + $dbret = db_query('SELECT * FROM {permission}'); + while ($role = db_fetch_object($dbret)) { + if ((strpos($role->perm, 'access print') !== FALSE)) { + $role->perm = 'access PDF version, ' . $role->perm; + $ret[] = update_sql("UPDATE {permission} SET perm = '$role->perm' WHERE rid = $role->rid"); + } + } + return $ret; +}