Needs review
Project:
OG Tasks
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
7 Nov 2012 at 07:14 UTC
Updated:
23 Aug 2018 at 20:43 UTC
Jump to comment: Most recent, Most recent file
Code will need some adjustments.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | og_tasks-port_to_og2.x-1834076-6-D7.patch | 3.61 KB | aasarava |
| #3 | port_code_to_og7.x-2_1834076_3.patch | 6.82 KB | roysegall |
| #1 | port_code_to_og7.x-2_1834076_2.patch | 6.83 KB | roysegall |
Comments
Comment #1
roysegall commentedaccept 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.
Comment #2
roysegall commentedAlso, i think this should another branch - 7.x-2.x that will contain the changes of the patch.
Comment #3
roysegall commentedMinor fix in the api.php file.
Comment #4
socialnicheguru commentedpatch -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;
+ }
Comment #5
fmitchell commentedAssigning to @chaunceyt. I know you've done some work on OG 2.x.
Comment #6
aasarava commentedHere'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.