Changeset 285
- Timestamp:
- 04/19/08 16:00:52 (8 months ago)
- Files:
-
- notification/lib.php (modified) (3 diffs)
- notification/plugin.info (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
notification/lib.php
r275 r285 81 81 include($CFG->dirroot.'mod/notification/notification.config.php'); 82 82 83 error_log("in init AUTONOTIFICATION_FOR_ADD: $AUTONOTIFICATION_FOR_ADD"); 84 83 85 if (!in_array($CFG->prefix . "notifications",$METATABLES)) { 84 86 if (file_exists($CFG->dirroot . "mod/notification/$CFG->dbtype.sql")) { … … 124 126 125 127 include($CFG->dirroot.'mod/notification/notification.config.php'); 128 error_log("AUTONOTIFICATION_FOR_ADD: $AUTONOTIFICATION_FOR_ADD"); 126 129 if (isset($notification_data)) { 127 130 foreach($notification_data as $n) { … … 132 135 } 133 136 } 137 } 138 } 139 140 function notification_exists($object_owner, $object_type, $userid) { 141 142 global $CFG; 143 144 $query = <<<END 145 SELECT n.ident FROM {$CFG->prefix}notifications n 146 INNER JOIN 147 {$CFG->prefix}notifications no 148 ON (no.ident = n.notification_object_id) 149 WHERE no.owner = $object_owner 150 AND no.object_type = '$object_type' 151 AND n.owner = $userid 152 END; 153 154 $results = get_records_sql($query); 155 if ($results) { 156 return true; 157 } else { 158 return false; 134 159 } 135 160 } notification/plugin.info
r259 r285 1 1 Maintainer: Kevin Jardine <kevin@radagast.biz> 2 2 Title: Notifications 3 Version: 0. 13 Version: 0.2 4 4 Package: notification 5 5 Source-URL: https://svn.elgg.org/plugins/notification
