From: Verdon V. <ve...@us...> - 2009-06-05 21:07:24
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5925/class Modified Files: RDX_Forms.php RDX_Location.php RDX_Member.php RDX_Runtime.php Rolodex.php Log Message: 1.3.1 prep Index: RDX_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Forms.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** RDX_Forms.php 24 Nov 2008 04:11:57 -0000 1.28 --- RDX_Forms.php 5 Jun 2009 21:06:16 -0000 1.29 *************** *** 42,46 **** case 'edit_member': if (empty($this->rolodex->member)) { ! $this->rolodex->loadMember($_REQUEST['user_id']); // I don't think the id in here matters but am unsure? } --- 42,47 ---- case 'edit_member': if (empty($this->rolodex->member)) { ! // $this->rolodex->loadMember($_REQUEST['user_id']); // I don't think the id in here matters but am unsure? ! $this->rolodex->loadMember(); // I don't think the id in here matters but am unsure? } *************** *** 1054,1058 **** $form->addCheckbox('email_privacy', 1); $form->setMatch('email_privacy', $member->email_privacy); ! $form->setLabel('email_privacy', dgettext('rolodex', 'Hide Email/Contact link from public')); if (PHPWS_Settings::get('rolodex', 'custom1_name')) { --- 1055,1059 ---- $form->addCheckbox('email_privacy', 1); $form->setMatch('email_privacy', $member->email_privacy); ! $form->setLabel('email_privacy', dgettext('rolodex', 'Hide Email/Contact link from everyone, except admins')); if (PHPWS_Settings::get('rolodex', 'custom1_name')) { Index: RDX_Runtime.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Runtime.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RDX_Runtime.php 20 Nov 2008 22:49:33 -0000 1.5 --- RDX_Runtime.php 5 Jun 2009 21:06:16 -0000 1.6 *************** *** 48,52 **** $db->addWhere('privacy', 0); } else { ! $db->addWhere('privacy', 1); } if (PHPWS_Settings::get('rolodex', 'block_order_by_rand')) { --- 48,53 ---- $db->addWhere('privacy', 0); } else { ! $db->addWhere('privacy', 0); ! $db->addWhere('privacy', 1, '=', 'or'); } if (PHPWS_Settings::get('rolodex', 'block_order_by_rand')) { Index: Rolodex.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/Rolodex.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Rolodex.php 24 Nov 2008 04:11:57 -0000 1.23 --- Rolodex.php 5 Jun 2009 21:06:16 -0000 1.24 *************** *** 513,517 **** case 'message_member': $this->loadForm('message_member'); ! $this->title = sprintf(dgettext('rolodex', 'Send a message to %s'), $this->member->getDisplay_name()); break; --- 513,517 ---- case 'message_member': $this->loadForm('message_member'); ! $this->title = sprintf(dgettext('rolodex', 'Send a message to %s'), $this->member->getDisplay_name(true)); break; *************** *** 527,531 **** } else { $this->loadForm('message_member'); ! $this->title = sprintf(dgettext('rolodex', 'Send a message to %s'), $this->member->getDisplay_name()); } break; --- 527,531 ---- } else { $this->loadForm('message_member'); ! $this->title = sprintf(dgettext('rolodex', 'Send a message to %s'), $this->member->getDisplay_name(true)); } break; Index: RDX_Location.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Location.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RDX_Location.php 20 Nov 2008 22:49:33 -0000 1.7 --- RDX_Location.php 5 Jun 2009 21:06:16 -0000 1.8 *************** *** 148,151 **** --- 148,152 ---- { $vars['location'] = $this->id; + $links = null; if (Current_User::allow('rolodex', 'settings', null, null, true)){ Index: RDX_Member.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Member.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RDX_Member.php 20 Nov 2008 22:49:33 -0000 1.19 --- RDX_Member.php 5 Jun 2009 21:06:16 -0000 1.20 *************** *** 204,208 **** } if ($print) { ! return sprintf('<img src="images/rolodex/%s" width="%s" height="%s" alt="%s" />', $this->image['name'], $this->image['width'], $this->image['height'], $this->getDisplay_name()); } else { return $this->image; --- 204,208 ---- } if ($print) { ! return sprintf('<img src="images/rolodex/%s" width="%s" height="%s" alt="%s" />', $this->image['name'], $this->image['width'], $this->image['height'], $this->getDisplay_name(true)); } else { return $this->image; *************** *** 217,225 **** } if ($print) { if ($link) { ! $thumb = sprintf('<img src="images/rolodex/%s" width="%s" height="%s" alt="%s" />', $this->image['thumb_name'], $this->image['thumb_width'], $this->image['thumb_height'], $this->getDisplay_name()); ! return PHPWS_Text::rewriteLink($thumb, 'rolodex', $this->user_id); } else { ! return sprintf('<img src="images/rolodex/%s" width="%s" height="%s" alt="%s" />', $this->image['thumb_name'], $this->image['thumb_width'], $this->image['thumb_height'], $this->getDisplay_name()); } } else { --- 217,225 ---- } if ($print) { + $thumb = sprintf('<img src="images/rolodex/%s" width="%s" height="%s" alt="%s" />', $this->image['thumb_name'], $this->image['thumb_width'], $this->image['thumb_height'], $this->getDisplay_name(true)); if ($link) { ! return sprintf('<a href="%s">%s</a>', $this->viewLink(false, true), $thumb); } else { ! return $thumb; } } else { *************** *** 525,531 **** } else { if (PHPWS_Settings::get('rolodex', 'contact_type')) { ! return PHPWS_Text::moduleLink($this->getDisplay_name(), "rolodex", array('uop'=>'message_member', 'id'=>$this->user_id)); } else { ! return '<a href="mailto:' . $this->contact_email . '" />' . $this->getDisplay_name() . '</a>'; } } --- 525,531 ---- } else { if (PHPWS_Settings::get('rolodex', 'contact_type')) { ! return PHPWS_Text::moduleLink($this->getDisplay_name(true), "rolodex", array('uop'=>'message_member', 'id'=>$this->user_id)); } else { ! return '<a href="mailto:' . $this->contact_email . '" />' . $this->getDisplay_name(true) . '</a>'; } } *************** *** 556,562 **** } else { if (PHPWS_Settings::get('rolodex', 'contact_type')) { ! return PHPWS_Text::moduleLink($this->getDisplay_name(), "rolodex", array('uop'=>'message_member', 'id'=>$this->user_id)); } else { ! return '<a href="mailto:' . $email . '" />' . $this->getDisplay_name() . '</a>'; } } --- 556,562 ---- } else { if (PHPWS_Settings::get('rolodex', 'contact_type')) { ! return PHPWS_Text::moduleLink($this->getDisplay_name(true), "rolodex", array('uop'=>'message_member', 'id'=>$this->user_id)); } else { ! return '<a href="mailto:' . $email . '" />' . $this->getDisplay_name(true) . '</a>'; } } *************** *** 589,593 **** return sprintf('<a href="%s" title="%s">%s</a>', $this->tidyUrl($this->website), ! sprintf(dgettext('rolodex', '%s\'s Website'), $this->getDisplay_name()), PHPWS_Text::shortenUrl($this->tidyUrl($this->website))); } --- 589,593 ---- return sprintf('<a href="%s" title="%s">%s</a>', $this->tidyUrl($this->website), ! sprintf(dgettext('rolodex', '%s\'s Website'), $this->getDisplay_name(true)), PHPWS_Text::shortenUrl($this->tidyUrl($this->website))); } *************** *** 1160,1164 **** $tpl['MEMBER_LINKS'] = $this->memberLinks(); ! Layout::addPageTitle($this->getDisplay_name()); $tpl['TITLE'] = $this->getDisplay_name(true); $tpl['DESCRIPTION'] = PHPWS_Text::parseTag($this->getDescription(true)); --- 1160,1164 ---- $tpl['MEMBER_LINKS'] = $this->memberLinks(); ! Layout::addPageTitle($this->getDisplay_name(true)); $tpl['TITLE'] = $this->getDisplay_name(true); $tpl['DESCRIPTION'] = PHPWS_Text::parseTag($this->getDescription(true)); *************** *** 1217,1225 **** if ($this->isDataVisible('privacy_contact')) { ! if ($this->email_privacy && !Current_User::getId()) { $tpl['CONTACT_EMAIL'] = null; $tpl['CONTACT_EMAIL_LABEL'] = null; } else { $tpl['CONTACT_EMAIL'] = $this->getDisplay_email(true); $tpl['CONTACT_EMAIL_LABEL'] = dgettext('rolodex', 'E-mail'); } --- 1217,1228 ---- if ($this->isDataVisible('privacy_contact')) { ! if ($this->email_privacy && !Current_User::allow('rolodex', 'view_privates')) { $tpl['CONTACT_EMAIL'] = null; $tpl['CONTACT_EMAIL_LABEL'] = null; } else { $tpl['CONTACT_EMAIL'] = $this->getDisplay_email(true); + if (Current_User::allow('rolodex', 'view_privates')) { + $tpl['CONTACT_EMAIL'] .= ' (' . $this->getDisplay_email() . ')'; + } $tpl['CONTACT_EMAIL_LABEL'] = dgettext('rolodex', 'E-mail'); } *************** *** 1365,1369 **** $vars['aop'] = 'delete_member'; $js['ADDRESS'] = PHPWS_Text::linkAddress('rolodex', $vars, true); ! $js['QUESTION'] = sprintf(dgettext('rolodex', 'Are you sure you want to delete the member %s?\nDemographic information will be retained for other modules, but all Rolodex member information will be permanently removed.'), addslashes(htmlspecialchars_decode($this->getDisplay_name(),ENT_QUOTES))); $js['LINK'] = dgettext('rolodex', 'Delete'); $links[] = javascript('confirm', $js); --- 1368,1372 ---- $vars['aop'] = 'delete_member'; $js['ADDRESS'] = PHPWS_Text::linkAddress('rolodex', $vars, true); ! $js['QUESTION'] = sprintf(dgettext('rolodex', 'Are you sure you want to delete the member %s?\nDemographic information will be retained for other modules, but all Rolodex member information will be permanently removed.'), addslashes(htmlspecialchars_decode($this->getDisplay_name(true),ENT_QUOTES))); $js['LINK'] = dgettext('rolodex', 'Delete'); $links[] = javascript('confirm', $js); *************** *** 1377,1381 **** $tpl['THUMBNAIL'] = $this->getThumbnail(true, true); if ($this->isDataVisible('privacy_contact')) { ! if ($this->email_privacy && !Current_User::getId()) { $tpl['CONTACT_EMAIL_LINK'] = ''; } else { --- 1380,1385 ---- $tpl['THUMBNAIL'] = $this->getThumbnail(true, true); if ($this->isDataVisible('privacy_contact')) { ! // if ($this->email_privacy && !Current_User::getId()) { ! if ($this->email_privacy && !Current_User::allow('rolodex', 'view_privates')) { $tpl['CONTACT_EMAIL_LINK'] = ''; } else { *************** *** 1546,1552 **** 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(); } --- 1550,1556 ---- if ($icon) { ! $name = $this->getDisplay_name(true) . 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(true); } *************** *** 1870,1874 **** $key->setUrl($this->viewLink(false,true)); $key->active = (int)$this->active; ! $key->setTitle($this->getDisplay_name()); $key->setSummary($this->description); $result = $key->save(); --- 1874,1878 ---- $key->setUrl($this->viewLink(false,true)); $key->active = (int)$this->active; ! $key->setTitle($this->getDisplay_name(true)); $key->setSummary($this->description); $result = $key->save(); *************** *** 1967,1989 **** $content .= '"' . dgettext('rolodex', 'Location(s)') . '",'; $content .= '"' . dgettext('rolodex', 'Feature(s)') . '",'; ! $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') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Address 1') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Address 2') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home City') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Province/State') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Country') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Postal/Zip') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Address 1') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Address 2') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business City') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Province/State') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Country') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Postal/Zip') . '",'; if (PHPWS_Settings::get('rolodex', 'custom1_name')) --- 1971,2005 ---- $content .= '"' . dgettext('rolodex', 'Location(s)') . '",'; $content .= '"' . dgettext('rolodex', 'Feature(s)') . '",'; ! if (Rolodex_member::isDataVisible('privacy_contact')) { ! $content .= '"' . dgettext('rolodex', 'E-Mail') . '",'; ! } ! if (Rolodex_member::isDataVisible('privacy_web')) { ! $content .= '"' . dgettext('rolodex', 'Website') . '",'; ! } ! if (Rolodex_member::isDataVisible('privacy_bus_phone')) { ! $content .= '"' . dgettext('rolodex', 'Business phone') . '",'; ! $content .= '"' . dgettext('rolodex', 'Ext') . '",'; ! $content .= '"' . dgettext('rolodex', 'Fax') . '",'; ! $content .= '"' . dgettext('rolodex', 'Toll-free phone') . '",'; ! } ! if (Rolodex_member::isDataVisible('privacy_home_phone')) { ! $content .= '"' . dgettext('rolodex', 'Home phone') . '",'; ! } ! if (Rolodex_member::isDataVisible('privacy_home')) { ! $content .= '"' . dgettext('rolodex', 'Home Address 1') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Address 2') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home City') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Province/State') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Country') . '",'; ! $content .= '"' . dgettext('rolodex', 'Home Postal/Zip') . '",'; ! } ! if (Rolodex_member::isDataVisible('privacy_business')) { ! $content .= '"' . dgettext('rolodex', 'Business Address 1') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Address 2') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business City') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Province/State') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Country') . '",'; ! $content .= '"' . dgettext('rolodex', 'Business Postal/Zip') . '",'; ! } if (PHPWS_Settings::get('rolodex', 'custom1_name')) *************** *** 2023,2050 **** $content .= '"' . $this->getHonorific() . '",'; $content .= '"' . $this->getBusiness_name() . '",'; ! $content .= '"' . $this->getDepartment . '",'; ! $content .= '"' . $this->getPosition_title . '",'; $content .= '"' . implode('; ', $this->get_categories(true, true)) . '",'; $content .= '"' . implode('; ', $this->get_locations(true, true)) . '",'; $content .= '"' . implode('; ', $this->get_features(true, true)) . '",'; ! $content .= '"' . $this->getDisplay_email() . '",'; ! $content .= '"' . $this->getWebsite() . '",'; ! $content .= '"' . $this->getDay_phone() . '",'; ! $content .= '"' . $this->getDay_phone_ext() . '",'; ! $content .= '"' . $this->getEvening_phone() . '",'; ! $content .= '"' . $this->getFax_number() . '",'; ! $content .= '"' . $this->getTollfree_phone() . '",'; ! $content .= '"' . $this->getMailing_address_1() . '",'; ! $content .= '"' . $this->getMailing_address_2() . '",'; ! $content .= '"' . $this->getMailing_city() . '",'; ! $content .= '"' . $this->getMailing_state() . '",'; ! $content .= '"' . $this->getMailing_country() . '",'; ! $content .= '"' . $this->getMailing_zip_code() . '",'; ! $content .= '"' . $this->getBusiness_address_1() . '",'; ! $content .= '"' . $this->getBusiness_address_2() . '",'; ! $content .= '"' . $this->getBusiness_city() . '",'; ! $content .= '"' . $this->getBusiness_state() . '",'; ! $content .= '"' . $this->getBusiness_country() . '",'; ! $content .= '"' . $this->getBusiness_zip_code() . '",'; if (PHPWS_Settings::get('rolodex', 'custom1_name')) --- 2039,2082 ---- $content .= '"' . $this->getHonorific() . '",'; $content .= '"' . $this->getBusiness_name() . '",'; ! $content .= '"' . $this->getDepartment() . '",'; ! $content .= '"' . $this->getPosition_title() . '",'; $content .= '"' . implode('; ', $this->get_categories(true, true)) . '",'; $content .= '"' . implode('; ', $this->get_locations(true, true)) . '",'; $content .= '"' . implode('; ', $this->get_features(true, true)) . '",'; ! if ($this->isDataVisible('privacy_contact')) { ! if ($this->email_privacy && !Current_User::allow('rolodex', 'view_privates')) { ! $content .= '"' . dgettext('rolodex', 'private') . '",'; ! } else { ! $content .= '"' . $this->getDisplay_email() . '",'; ! } ! } ! if ($this->isDataVisible('privacy_web')) { ! $content .= '"' . $this->getWebsite() . '",'; ! } ! if ($this->isDataVisible('privacy_bus_phone')) { ! $content .= '"' . $this->getDay_phone() . '",'; ! $content .= '"' . $this->getDay_phone_ext() . '",'; ! $content .= '"' . $this->getFax_number() . '",'; ! $content .= '"' . $this->getTollfree_phone() . '",'; ! } ! if ($this->isDataVisible('privacy_home_phone')) { ! $content .= '"' . $this->getEvening_phone() . '",'; ! } ! if ($this->isDataVisible('privacy_home')) { ! $content .= '"' . $this->getMailing_address_1() . '",'; ! $content .= '"' . $this->getMailing_address_2() . '",'; ! $content .= '"' . $this->getMailing_city() . '",'; ! $content .= '"' . $this->getMailing_state() . '",'; ! $content .= '"' . $this->getMailing_country() . '",'; ! $content .= '"' . $this->getMailing_zip_code() . '",'; ! } ! if ($this->isDataVisible('privacy_business')) { ! $content .= '"' . $this->getBusiness_address_1() . '",'; ! $content .= '"' . $this->getBusiness_address_2() . '",'; ! $content .= '"' . $this->getBusiness_city() . '",'; ! $content .= '"' . $this->getBusiness_state() . '",'; ! $content .= '"' . $this->getBusiness_country() . '",'; ! $content .= '"' . $this->getBusiness_zip_code() . '",'; ! } if (PHPWS_Settings::get('rolodex', 'custom1_name')) *************** *** 2090,2097 **** $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')); } --- 2122,2129 ---- $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(true), $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(true), $url); $subject = sprintf(dgettext('rolodex', 'Modified %s Profile'), PHPWS_Settings::get('rolodex', 'module_title')); } |