Comments

roysegall’s picture

Status: Active » Needs review
StatusFileSize
new6.83 KB

accept for porting this module and adapt him to the OG 7.x-2 branch iv'e added a few things:
1. API file so other could see which hooks, in this case 1 hook, this module needs.
2. Created a new module call OG Tasks example that show how to declare a new task. That task use message notify to send email to the group owner via email and notify him that the tasks of his group were executed.
3. I change the code to Drupal coding standards - some thing like 3 lines.

roysegall’s picture

Also, i think this should another branch - 7.x-2.x that will contain the changes of the patch.

roysegall’s picture

StatusFileSize
new6.82 KB

Minor fix in the api.php file.

socialnicheguru’s picture

Issue summary: View changes

patch -p1 < p*h
patching file includes/admin.inc
Hunk #2 succeeded at 91 with fuzz 2.
patching file includes/task.inc
patching file og_tasks.api.php
patching file og_tasks.module
Hunk #2 FAILED at 46.
1 out of 3 hunks FAILED -- saving rejects to file og_tasks.module.rej
patching file og_tasks_example/includes/og_tasks_example.task.inc
patching file og_tasks_example/og_tasks_example.info
patching file og_tasks_example/og_tasks_example.module

~/p/7/m/all/og_tasks$ more *rej
--- og_tasks.module
+++ og_tasks.module
@@ -46,10 +46,12 @@
/**
* Implementation of hook_og_ui_get_group_admin()
*/
-function og_tasks_og_ui_get_group_admin($gid) {
+function og_tasks_og_ui_get_group_admin($entity_type, $entity) {
$items = array();

- $default_access = og_is_group_default_access($gid);
+ if (!og_user_access($entity_type, $entity, 'run og tasks')) {
+ return;
+ }

fmitchell’s picture

Assigned: Unassigned » chaunceyt

Assigning to @chaunceyt. I know you've done some work on OG 2.x.

aasarava’s picture

StatusFileSize
new3.61 KB

Here's an updated patch against 7.x-1.x-dev that fixes the issue with og_tasks_og_ui_get_group_admin() as reported in comment #4 above.