diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-10-04 17:38:19 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-10-04 17:38:19 -0300 |
commit | 12f55f534e67ca29e16c83c089b614022ea0ac0b (patch) | |
tree | 99632674e6f00928312eb94bb54b0eba8db49d73 | |
parent | f47b73d4bc46351a2ed6fdb842ce452b815df58e (diff) | |
download | muamba-12f55f534e67ca29e16c83c089b614022ea0ac0b.tar.gz muamba-12f55f534e67ca29e16c83c089b614022ea0ac0b.tar.bz2 |
Coding accept()
-rw-r--r-- | muamba.business.inc | 5 | ||||
-rw-r--r-- | muamba.misc.inc | 2 | ||||
-rw-r--r-- | muamba.module | 6 | ||||
-rw-r--r-- | muamba.theme.inc | 13 |
4 files changed, 19 insertions, 7 deletions
diff --git a/muamba.business.inc b/muamba.business.inc index 4d4bc5b..eabd351 100644 --- a/muamba.business.inc +++ b/muamba.business.inc @@ -142,8 +142,6 @@ function muamba_request($nid) { * * @param $mid * Transaction id. - * - * @todo */ function muamba_accept($mid) { global $user; @@ -170,7 +168,8 @@ function muamba_accept($mid) { ->execute(); // Notify item owner - // TODO + $message = theme('muamba_accept_message', array('transaction' => $transaction)); + $reply = privatemsg_reply($transaction['thread_id'], $message); return t('Accepted item request.'); } diff --git a/muamba.misc.inc b/muamba.misc.inc index 8c26159..7ffa0e0 100644 --- a/muamba.misc.inc +++ b/muamba.misc.inc @@ -68,7 +68,7 @@ function muamba_actions($code = NULL) { MUAMBA_REQUESTED => 'request', MUAMBA_ACCEPTED => 'accept', MUAMBA_REJECTED => 'reject', - MUAMBA_RELEASED => 'releas', + MUAMBA_RELEASED => 'release', MUAMBA_RETURNED => 'return', ); diff --git a/muamba.module b/muamba.module index 2a45c70..fa72412 100644 --- a/muamba.module +++ b/muamba.module @@ -152,6 +152,12 @@ function muamba_theme($existing, $type, $theme, $path) { ), 'file' => 'muamba.theme.inc', ), + 'muamba_accept_message' => array( + 'variables' => array( + 'transaction' => NULL, + ), + 'file' => 'muamba.theme.inc', + ), ); } diff --git a/muamba.theme.inc b/muamba.theme.inc index 5fc3b19..af15da9 100644 --- a/muamba.theme.inc +++ b/muamba.theme.inc @@ -84,9 +84,16 @@ function theme_muamba_colorbox_link($variables) { /** * Theme callback. - * - * @todo */ function theme_muamba_request_message($transaction = NULL) { - return t('User has requested an item'); + $link = l(t('your requests page'), 'muamba'); + return t('Hi, I would like to request this item of yours. Please visit @link to manage this request', + array('@link' => $link)); +} + +/** + * Theme callback. + */ +function theme_muamba_accept_message($transaction = NULL) { + return t('I accept your item request'); } |