Commit e4cefdd6 authored by robertDouglass's avatar robertDouglass

#80166 by ankur: optional workflow to send request emails to the user who must...

#80166 by ankur: optional workflow to send request emails to the user who must approve or deny the request to become buddies.
parent 6172d5d4
......@@ -108,6 +108,8 @@ Browsing improvements by Doug Sikora
Maintainer: Robert Douglass
Status: maintained (Feb. 2006)
Request/Approval Feature by Ankur Rishi, courtesy of Jewcy.com
TODO
----
1. PGSQL schema (see buddylist.install, buddylist_install())
......
......@@ -32,9 +32,17 @@ function buddylist_install() {
label varchar(255) NOT NULL default '',
visible tinyint(1) NOT NULL default '0',
PRIMARY KEY (uid, label_id)
) /*!40100 DEFAULT CHARACTER SET utf8 */;");
$query4 = db_query("
CREATE TABLE {buddylist_pending_requests} (
requester_uid int(11) NOT NULL default '0',
requestee_uid int(11) NOT NULL default '0',
received tinyint(1),
PRIMARY KEY (requester_uid, requestee_uid)
) /*!40100 DEFAULT CHARACTER SET utf8 */;");
if ($query1 && $query2 && $query3) {
if ($query1 && $query2 && $query3 && $query4) {
$created = TRUE;
}
break;
......@@ -50,3 +58,32 @@ function buddylist_install() {
function buddylist_update_1() {
return _system_update_utf8(array('buddylist'));
}
function buddylist_update_2() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$result = update_sql("
CREATE TABLE {buddylist_pending_requests} (
requester_uid int(11) NOT NULL default '0',
requestee_uid int(11) NOT NULL default '0',
received tinyint(1),
PRIMARY KEY (requester_uid, requestee_uid)
) /*!40100 DEFAULT CHARACTER SET utf8 */;
");
$ret[] = $result;
break;
}
if ($result['success']) {
drupal_set_message(t('The database schema update for the Buddylist module was successful.'));
}
else {
drupal_set_message(t('Table database schema update for the Buddylist module was unsuccessful. The schema may need to be updated by hand. See the README.txt file for a list of the installation queries.'), 'error');
}
return $ret;
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment