|
From: Verdon V. <ve...@us...> - 2008-07-06 13:09:30
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv382/class Modified Files: RDX_Forms.php RDX_Member.php RDX_Runtime.php Rolodex.php Log Message: closing in on 1.0 Index: RDX_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Forms.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RDX_Forms.php 3 Jul 2008 14:10:04 -0000 1.15 --- RDX_Forms.php 6 Jul 2008 13:05:17 -0000 1.16 *************** *** 136,140 **** ! function listMembers($approved=null, $expired=false) { //print_r($_REQUEST); exit; --- 136,140 ---- ! function listMembers($approved=null, $expired=false, $location=null, $feature=null, $category=null) { //print_r($_REQUEST); exit; *************** *** 262,265 **** --- 262,279 ---- } + /* if it's a list by location */ + if ($location) { + $_REQUEST['locations'] = $location; + PHPWS_Core::initModClass('rolodex', 'RDX_Location.php'); + $item = new Rolodex_Location($location); + Layout::addPageTitle($item->getTitle()); + $ptags['ITEM_TITLE'] = $item->getTitle(true); + $ptags['ITEM_DESCRIPTION'] = PHPWS_Text::parseTag($item->getDescription(true)); + $ptags['ITEM_IMAGE'] = $item->getFile(); + if ($item->getFile()) { + $ptags['ITEM_IMAGE'] = $item->getFile(); + $ptags['ITEM_CLEAR_FLOAT'] = '<br style="clear: right;" />'; + } + } /* search by location */ if (isset($_REQUEST['locations'])) { *************** *** 270,273 **** --- 284,301 ---- } + /* if it's a list by feature */ + if ($feature) { + $_REQUEST['features'] = $feature; + PHPWS_Core::initModClass('rolodex', 'RDX_Feature.php'); + $item = new Rolodex_Feature($feature); + Layout::addPageTitle($item->getTitle()); + $ptags['ITEM_TITLE'] = $item->getTitle(true); + $ptags['ITEM_DESCRIPTION'] = PHPWS_Text::parseTag($item->getDescription(true)); + $ptags['ITEM_IMAGE'] = $item->getFile(); + if ($item->getFile()) { + $ptags['ITEM_IMAGE'] = $item->getFile(); + $ptags['ITEM_CLEAR_FLOAT'] = '<br style="clear: right;" />'; + } + } /* search by feature */ if (isset($_REQUEST['features'])) { *************** *** 278,281 **** --- 306,323 ---- } + /* if it's a list by category */ + if ($category) { + $_REQUEST['categories'] = $category; + PHPWS_Core::initModClass('categories', 'Category.php'); + $item = new Category($category); + Layout::addPageTitle($item->getTitle()); + $ptags['ITEM_TITLE'] = $item->getTitle(); + $ptags['ITEM_DESCRIPTION'] = PHPWS_Text::parseTag($item->getDescription()); + $ptags['ITEM_IMAGE'] = $item->getIcon(); + if ($item->getIcon()) { + $ptags['ITEM_IMAGE'] = $item->getIcon(); + $ptags['ITEM_CLEAR_FLOAT'] = '<br style="clear: right;" />'; + } + } /* search by category */ if (isset($_REQUEST['categories'])) { *************** *** 323,327 **** /* get the final content */ $this->rolodex->content = $pager->get(); ! // $this->rolodex->content .= Categories::getCategoryList('rolodex'); --- 365,370 ---- /* get the final content */ $this->rolodex->content = $pager->get(); ! ! /* don't remember what I was testing/doing with the next line doh! */ // $this->rolodex->content .= Categories::getCategoryList('rolodex'); *************** *** 333,336 **** --- 376,382 ---- } else { $this->rolodex->title = sprintf(dgettext('rolodex', '%s Members'), PHPWS_Settings::get('rolodex', 'module_title')); + if (isset($ptags['ITEM_TITLE'])) { + $this->rolodex->title .= sprintf(dgettext('rolodex', ' - %s'), $ptags['ITEM_TITLE']); + } } } *************** *** 480,484 **** $tpl['CRITERIA_LABEL'] = dgettext('rolodex', 'Criteria'); $tpl['SEARCH_LABEL'] = dgettext('rolodex', 'Search'); ! $tpl['TIP'] = dgettext('rolodex', 'Select one or more of the available options below to filter a list of members. It is possible to get too specific. If your search returns an empty list, try selecting fewer criteria.'); $this->rolodex->title = sprintf(dgettext('rolodex', '%s Advanced Search'), PHPWS_Settings::get('rolodex', 'module_title')); --- 526,531 ---- $tpl['CRITERIA_LABEL'] = dgettext('rolodex', 'Criteria'); $tpl['SEARCH_LABEL'] = dgettext('rolodex', 'Search'); ! $tpl['TIP_SELECT'] = dgettext('rolodex', 'Select one or more of the available options below to filter a list of members. It is possible to get too specific. If your search returns an empty list, try selecting fewer criteria.'); ! $tpl['TIP_MULTI'] = dgettext('rolodex', 'To select more than one itme from any given list, click on the first item then hold your control key and click on the next. Use shift-click to select a range of items. Mac users, use command-click and shift-click.'); $this->rolodex->title = sprintf(dgettext('rolodex', '%s Advanced Search'), PHPWS_Settings::get('rolodex', 'module_title')); *************** *** 515,518 **** --- 562,569 ---- $form->setLabel('send_notification', dgettext('rolodex', 'Send notification of pending applications')); + $form->addCheckbox('notify_all_saves', 1); + $form->setMatch('notify_all_saves', PHPWS_Settings::get('rolodex', 'notify_all_saves')); + $form->setLabel('notify_all_saves', dgettext('rolodex', 'Send notification upon all member edits (not those done by an admin)')); + $form->addText('admin_contact', PHPWS_Settings::get('rolodex', 'admin_contact')); $form->setSize('admin_contact', 30); *************** *** 547,553 **** $form->setMatch('privacy_web', PHPWS_Settings::get('rolodex', 'privacy_web')); ! $form->addRadio('privacy_phone', array(0, 1, 2)); ! $form->setLabel('privacy_phone', array(dgettext('rolodex', 'Public'), dgettext('rolodex', 'Members only'), dgettext('rolodex', 'Restricted users'))); ! $form->setMatch('privacy_phone', PHPWS_Settings::get('rolodex', 'privacy_phone')); $form->addRadio('privacy_home', array(0, 1, 2)); --- 598,608 ---- $form->setMatch('privacy_web', PHPWS_Settings::get('rolodex', 'privacy_web')); ! $form->addRadio('privacy_home_phone', array(0, 1, 2)); ! $form->setLabel('privacy_home_phone', array(dgettext('rolodex', 'Public'), dgettext('rolodex', 'Members only'), dgettext('rolodex', 'Restricted users'))); ! $form->setMatch('privacy_home_phone', PHPWS_Settings::get('rolodex', 'privacy_home_phone')); ! ! $form->addRadio('privacy_bus_phone', array(0, 1, 2)); ! $form->setLabel('privacy_bus_phone', array(dgettext('rolodex', 'Public'), dgettext('rolodex', 'Members only'), dgettext('rolodex', 'Restricted users'))); ! $form->setMatch('privacy_bus_phone', PHPWS_Settings::get('rolodex', 'privacy_bus_phone')); $form->addRadio('privacy_home', array(0, 1, 2)); *************** *** 721,725 **** $tpl['PRIVACY_CONTACT_TITLE'] = dgettext('rolodex', 'Contact link'); $tpl['PRIVACY_WEB_TITLE'] = dgettext('rolodex', 'Website link'); ! $tpl['PRIVACY_PHONE_TITLE'] = dgettext('rolodex', 'Phone numbers'); $tpl['PRIVACY_HOME_TITLE'] = dgettext('rolodex', 'Home address'); $tpl['PRIVACY_BUSINESS_TITLE'] = dgettext('rolodex', 'Business address'); --- 776,781 ---- $tpl['PRIVACY_CONTACT_TITLE'] = dgettext('rolodex', 'Contact link'); $tpl['PRIVACY_WEB_TITLE'] = dgettext('rolodex', 'Website link'); ! $tpl['PRIVACY_HOME_PHONE_TITLE'] = dgettext('rolodex', 'Home phone numbers'); ! $tpl['PRIVACY_BUS_PHONE_TITLE'] = dgettext('rolodex', 'Business phone numbers'); $tpl['PRIVACY_HOME_TITLE'] = dgettext('rolodex', 'Home address'); $tpl['PRIVACY_BUSINESS_TITLE'] = dgettext('rolodex', 'Business address'); *************** *** 867,883 **** $form->addText('day_phone', $member->day_phone); ! $form->setSize('day_phone', 10); ! $form->setLabel('day_phone', dgettext('rolodex', 'Day phone')); $form->addText('day_phone_ext', $member->day_phone_ext); ! $form->setSize('day_phone_ext', 6); $form->setLabel('day_phone_ext', dgettext('rolodex', 'Extension')); $form->addText('fax_number', $member->fax_number); ! $form->setSize('fax_number', 10); $form->setLabel('fax_number', dgettext('rolodex', 'Fax')); $form->addText('tollfree_phone', $member->tollfree_phone); ! $form->setSize('tollfree_phone', 10); $form->setLabel('tollfree_phone', dgettext('rolodex', 'Toll-free phone')); --- 923,943 ---- $form->addText('day_phone', $member->day_phone); ! $form->setSize('day_phone', 15); ! $form->setLabel('day_phone', dgettext('rolodex', 'Business phone')); $form->addText('day_phone_ext', $member->day_phone_ext); ! $form->setSize('day_phone_ext', 4); $form->setLabel('day_phone_ext', dgettext('rolodex', 'Extension')); + $form->addText('evening_phone', $member->evening_phone); + $form->setSize('evening_phone', 15); + $form->setLabel('evening_phone', dgettext('rolodex', 'Home phone')); + $form->addText('fax_number', $member->fax_number); ! $form->setSize('fax_number', 15); $form->setLabel('fax_number', dgettext('rolodex', 'Fax')); $form->addText('tollfree_phone', $member->tollfree_phone); ! $form->setSize('tollfree_phone', 15); $form->setLabel('tollfree_phone', dgettext('rolodex', 'Toll-free phone')); Index: RDX_Runtime.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Runtime.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RDX_Runtime.php 3 Jul 2008 14:10:04 -0000 1.2 --- RDX_Runtime.php 6 Jul 2008 13:05:17 -0000 1.3 *************** *** 60,64 **** $tpl['TITLE'] = PHPWS_Settings::get('rolodex', 'module_title'); if (PHPWS_Settings::get('rolodex', 'block_order_by_rand')) { ! $tpl['MEMBER_LABEL'] = dgettext('rolodex', 'Random Member'); } else { $tpl['MEMBER_LABEL'] = dgettext('rolodex', 'Most Recent Member'); --- 60,64 ---- $tpl['TITLE'] = PHPWS_Settings::get('rolodex', 'module_title'); if (PHPWS_Settings::get('rolodex', 'block_order_by_rand')) { ! $tpl['MEMBER_LABEL'] = dgettext('rolodex', 'Featured Member'); } else { $tpl['MEMBER_LABEL'] = dgettext('rolodex', 'Most Recent Member'); Index: Rolodex.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/Rolodex.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Rolodex.php 3 Jul 2008 14:10:04 -0000 1.13 --- Rolodex.php 6 Jul 2008 13:05:17 -0000 1.14 *************** *** 477,480 **** --- 477,481 ---- break; + /* old views case 'view_location': $this->loadLocation(); *************** *** 494,497 **** --- 495,558 ---- $this->content = $this->categoryView(); break; + */ + + case 'view_location': + if (!PHPWS_Settings::get('rolodex', 'allow_anon') && !Current_User::getId()) { + $this->title = PHPWS_Settings::get('rolodex', 'module_title'); + $this->content = dgettext('rolodex', 'Sorry, anonymous member viewing is not allowed. You will need to login to view this directory.'); + } else { + if (isset($_REQUEST['location_id'])) { + $id = $_REQUEST['location_id']; + } elseif (isset($_REQUEST['location'])) { + $id = $_REQUEST['location']; + } elseif (isset($_REQUEST['id'])) { + $id = $_REQUEST['id']; + } + PHPWS_Core::initModClass('rolodex', 'RDX_Forms.php'); + $this->forms = new Rolodex_Forms; + $this->forms->rolodex = & $this; + $this->forms->listMembers(1, false, $id, null, null); + } + break; + + case 'view_feature': + if (!PHPWS_Settings::get('rolodex', 'allow_anon') && !Current_User::getId()) { + $this->title = PHPWS_Settings::get('rolodex', 'module_title'); + $this->content = dgettext('rolodex', 'Sorry, anonymous member viewing is not allowed. You will need to login to view this directory.'); + } else { + if (isset($_REQUEST['feature_id'])) { + $id = $_REQUEST['feature_id']; + } elseif (isset($_REQUEST['feature'])) { + $id = $_REQUEST['feature']; + } elseif (isset($_REQUEST['id'])) { + $id = $_REQUEST['id']; + } + PHPWS_Core::initModClass('rolodex', 'RDX_Forms.php'); + $this->forms = new Rolodex_Forms; + $this->forms->rolodex = & $this; + $this->forms->listMembers(1, false, null, $id, null); + } + break; + + case 'view_category': + if (!PHPWS_Settings::get('rolodex', 'allow_anon') && !Current_User::getId()) { + $this->title = PHPWS_Settings::get('rolodex', 'module_title'); + $this->content = dgettext('rolodex', 'Sorry, anonymous member viewing is not allowed. You will need to login to view this directory.'); + } else { + if (isset($_REQUEST['category_id'])) { + $id = $_REQUEST['category_id']; + } elseif (isset($_REQUEST['category'])) { + $id = $_REQUEST['category']; + } elseif (isset($_REQUEST['id'])) { + $id = $_REQUEST['id']; + } + PHPWS_Core::initModClass('rolodex', 'RDX_Forms.php'); + $this->forms = new Rolodex_Forms; + $this->forms->rolodex = & $this; + $this->forms->listMembers(1, false, null, null, $id); + } + break; + + // function listMembers($approved=null, $expired=false, $location=null, $feature=null, $category=null) *************** *** 656,659 **** --- 717,724 ---- PHPWS_Settings::set('rolodex', 'send_notification', 0); + isset($_POST['notify_all_saves']) ? + PHPWS_Settings::set('rolodex', 'notify_all_saves', 1) : + PHPWS_Settings::set('rolodex', 'notify_all_saves', 0); + if (isset($_POST['admin_contact']) && ($_POST['admin_contact']) !== '') { if (PHPWS_Text::isValidInput($_POST['admin_contact'], 'email')) { *************** *** 696,700 **** PHPWS_Settings::set('rolodex', 'privacy_contact', $_POST['privacy_contact']); PHPWS_Settings::set('rolodex', 'privacy_web', $_POST['privacy_web']); ! PHPWS_Settings::set('rolodex', 'privacy_phone', $_POST['privacy_phone']); PHPWS_Settings::set('rolodex', 'privacy_home', $_POST['privacy_home']); PHPWS_Settings::set('rolodex', 'privacy_business', $_POST['privacy_business']); --- 761,766 ---- PHPWS_Settings::set('rolodex', 'privacy_contact', $_POST['privacy_contact']); PHPWS_Settings::set('rolodex', 'privacy_web', $_POST['privacy_web']); ! PHPWS_Settings::set('rolodex', 'privacy_home_phone', $_POST['privacy_home_phone']); ! PHPWS_Settings::set('rolodex', 'privacy_bus_phone', $_POST['privacy_bus_phone']); PHPWS_Settings::set('rolodex', 'privacy_home', $_POST['privacy_home']); PHPWS_Settings::set('rolodex', 'privacy_business', $_POST['privacy_business']); *************** *** 949,952 **** --- 1015,1022 ---- } + if (isset($_POST['evening_phone'])) { + $this->member->setEvening_phone($_POST['evening_phone']); + } + if (isset($_POST['fax_number'])) { $this->member->setFax_number($_POST['fax_number']); Index: RDX_Member.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Member.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RDX_Member.php 3 Jul 2008 14:10:04 -0000 1.12 --- RDX_Member.php 6 Jul 2008 13:05:17 -0000 1.13 *************** *** 42,45 **** --- 42,46 ---- var $day_phone = null; var $day_phone_ext = null; + var $evening_phone = null; var $fax_number = null; var $contact_email = null; *************** *** 442,445 **** --- 443,465 ---- + function setEvening_phone($evening_phone) + { + $this->evening_phone = PHPWS_Text::parseInput($evening_phone); + } + + function getEvening_phone($print=false) + { + if (empty($this->evening_phone)) { + return null; + } + + if ($print) { + return PHPWS_Text::parseOutput($this->evening_phone); + } else { + return $this->evening_phone; + } + } + + function setFax_number($fax_number) { *************** *** 1164,1170 **** $tpl['CONTACT_GROUP_LABEL'] = dgettext('rolodex', 'Contact information'); ! if ($this->isDataVisible('privacy_phone')) { if ($this->getDay_phone()) { ! $tpl['DAY_PHONE_LABEL'] = dgettext('rolodex', 'Day phone'); $tpl['DAY_PHONE'] = $this->getDay_phone(true); } --- 1184,1190 ---- $tpl['CONTACT_GROUP_LABEL'] = dgettext('rolodex', 'Contact information'); ! if ($this->isDataVisible('privacy_bus_phone')) { if ($this->getDay_phone()) { ! $tpl['DAY_PHONE_LABEL'] = dgettext('rolodex', 'Business phone'); $tpl['DAY_PHONE'] = $this->getDay_phone(true); } *************** *** 1182,1185 **** --- 1202,1211 ---- } } + if ($this->isDataVisible('privacy_home_phone')) { + if ($this->getEvening_phone()) { + $tpl['EVENING_PHONE_LABEL'] = dgettext('rolodex', 'Home phone'); + $tpl['EVENING_PHONE'] = $this->getEvening_phone(true); + } + } if ($this->isDataVisible('privacy_contact')) { *************** *** 1368,1374 **** if (PHPWS_Settings::get('rolodex', 'browse_phone')) { ! if ($this->isDataVisible('privacy_phone')) { if ($this->getDay_phone()) { ! $tpl['LIST_DAY_PHONE_LABEL'] = dgettext('rolodex', 'Day phone'); $tpl['LIST_DAY_PHONE'] = $this->getDay_phone(true); } --- 1394,1400 ---- if (PHPWS_Settings::get('rolodex', 'browse_phone')) { ! if ($this->isDataVisible('privacy_bus_phone')) { if ($this->getDay_phone()) { ! $tpl['LIST_DAY_PHONE_LABEL'] = dgettext('rolodex', 'Business phone'); $tpl['LIST_DAY_PHONE'] = $this->getDay_phone(true); } *************** *** 1386,1389 **** --- 1412,1421 ---- } } + if ($this->isDataVisible('privacy_home_phone')) { + if ($this->getEvening_phone()) { + $tpl['LIST_EVENING_PHONE_LABEL'] = dgettext('rolodex', 'Home phone'); + $tpl['LIST_EVENING_PHONE'] = $this->getEvening_phone(true); + } + } } *************** *** 1488,1494 **** ! function viewLink() { ! return PHPWS_Text::rewriteLink($this->getDisplay_name(), 'rolodex', $this->user_id); } --- 1520,1531 ---- ! function viewLink($icon=false) { ! if ($icon) { ! $name = $this->getDisplay_name() . sprintf(' <img src="images/mod/rolodex/view.gif" alt="%s" title="%s" />', dgettext('rolodex', 'View Details'), dgettext('rolodex', 'View Details')); ! } else { ! $name = $this->getDisplay_name(); ! } ! return PHPWS_Text::rewriteLink($name, 'rolodex', $this->user_id); } *************** *** 1513,1517 **** function viewTpl() { ! $tpl['MEMBER_TITLE'] = $this->viewLink(); $tpl['MEMBER_DESCRIPTION'] = $this->getListDescription(300); $tpl['MEMBER_LINKS'] = $this->editLink(); --- 1550,1554 ---- function viewTpl() { ! $tpl['MEMBER_TITLE'] = $this->viewLink(true); $tpl['MEMBER_DESCRIPTION'] = $this->getListDescription(300); $tpl['MEMBER_LINKS'] = $this->editLink(); *************** *** 1547,1553 **** if (PHPWS_Settings::get('rolodex', 'list_phone')) { ! if ($this->isDataVisible('privacy_phone')) { if ($this->getDay_phone()) { ! $tpl['LIST_DAY_PHONE_LABEL'] = dgettext('rolodex', 'Day phone'); $tpl['LIST_DAY_PHONE'] = $this->getDay_phone(true); } --- 1584,1590 ---- if (PHPWS_Settings::get('rolodex', 'list_phone')) { ! if ($this->isDataVisible('privacy_bus_phone')) { if ($this->getDay_phone()) { ! $tpl['LIST_DAY_PHONE_LABEL'] = dgettext('rolodex', 'Business phone'); $tpl['LIST_DAY_PHONE'] = $this->getDay_phone(true); } *************** *** 1565,1568 **** --- 1602,1611 ---- } } + if ($this->isDataVisible('privacy_home_phone')) { + if ($this->getEvening_phone()) { + $tpl['LIST_EVENING_PHONE_LABEL'] = dgettext('rolodex', 'Home phone'); + $tpl['LIST_EVENING_PHONE'] = $this->getEvening_phone(true); + } + } } *************** *** 1706,1712 **** $this->active = 0; if (PHPWS_Settings::get('rolodex', 'send_notification') && PHPWS_Settings::get('rolodex', 'admin_contact')) { ! $this->sendNotification(); } } } --- 1749,1759 ---- $this->active = 0; if (PHPWS_Settings::get('rolodex', 'send_notification') && PHPWS_Settings::get('rolodex', 'admin_contact')) { ! $this->sendNotification(true); } } + } else { + if (PHPWS_Settings::get('rolodex', 'notify_all_saves') && PHPWS_Settings::get('rolodex', 'admin_contact') && !Current_User::allow('rolodex')) { + $this->sendNotification(false); + } } *************** *** 1923,1928 **** $content .= '"' . dgettext('rolodex', 'E-Mail') . '",'; $content .= '"' . dgettext('rolodex', 'Website') . '",'; ! $content .= '"' . dgettext('rolodex', 'Day phone') . '",'; $content .= '"' . dgettext('rolodex', 'Ext') . '",'; $content .= '"' . dgettext('rolodex', 'Fax') . '",'; $content .= '"' . dgettext('rolodex', 'Toll-free phone') . '",'; --- 1970,1976 ---- $content .= '"' . dgettext('rolodex', 'E-Mail') . '",'; $content .= '"' . dgettext('rolodex', 'Website') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business phone') . '",'; $content .= '"' . dgettext('rolodex', 'Ext') . '",'; + $content .= '"' . dgettext('rolodex', 'Home phone') . '",'; $content .= '"' . dgettext('rolodex', 'Fax') . '",'; $content .= '"' . dgettext('rolodex', 'Toll-free phone') . '",'; *************** *** 1985,1988 **** --- 2033,2037 ---- $content .= '"' . $this->getDay_phone() . '",'; $content .= '"' . $this->getDay_phone_ext() . '",'; + $content .= '"' . $this->getEvening_phone() . '",'; $content .= '"' . $this->getFax_number() . '",'; $content .= '"' . $this->getTollfree_phone() . '",'; *************** *** 2035,2039 **** ! function sendNotification() { --- 2084,2088 ---- ! function sendNotification($new=true) { *************** *** 2041,2050 **** $site_contact = PHPWS_User::getUserSetting('site_contact'); $url = PHPWS_Core::getHomeHttp(); ! $message = sprintf(dgettext('rolodex', 'You have a new %s application from %s waiting for your review at %s.'), PHPWS_Settings::get('rolodex', 'module_title'), $this->getDisplay_name(), $url); PHPWS_Core::initCoreClass('Mail.php'); $mail = new PHPWS_Mail; $mail->addSendTo(PHPWS_Settings::get('rolodex', 'admin_contact')); ! $mail->setSubject(sprintf(dgettext('rolodex', 'Pending %s Application'), PHPWS_Settings::get('rolodex', 'module_title'))); $mail->setFrom(sprintf('%s<%s>', $page_title, $site_contact)); $mail->setMessageBody($message); --- 2090,2105 ---- $site_contact = PHPWS_User::getUserSetting('site_contact'); $url = PHPWS_Core::getHomeHttp(); ! if ($new) { ! $message = sprintf(dgettext('rolodex', 'You have a new %s application from %s waiting for your review at %s.'), PHPWS_Settings::get('rolodex', 'module_title'), $this->getDisplay_name(), $url); ! $subject = sprintf(dgettext('rolodex', 'Pending %s Application'), PHPWS_Settings::get('rolodex', 'module_title')); ! } else { ! $message = sprintf(dgettext('rolodex', 'The %s profile for %s has been modified at %s.'), PHPWS_Settings::get('rolodex', 'module_title'), $this->getDisplay_name(), $url); ! $subject = sprintf(dgettext('rolodex', 'Modified %s Profile'), PHPWS_Settings::get('rolodex', 'module_title')); ! } PHPWS_Core::initCoreClass('Mail.php'); $mail = new PHPWS_Mail; $mail->addSendTo(PHPWS_Settings::get('rolodex', 'admin_contact')); ! $mail->setSubject($subject); $mail->setFrom(sprintf('%s<%s>', $page_title, $site_contact)); $mail->setMessageBody($message); |