|
From: Verdon V. <ve...@us...> - 2008-07-17 13:50:44
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8253/class Modified Files: RDX_Forms.php RDX_Member.php Rolodex.php Log Message: 1.0.1 changes Index: RDX_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Forms.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RDX_Forms.php 7 Jul 2008 13:55:01 -0000 1.18 --- RDX_Forms.php 17 Jul 2008 13:50:21 -0000 1.19 *************** *** 1005,1008 **** --- 1005,1012 ---- $form->setMatch('privacy', $member->privacy); + $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')) { $form->addText('custom1', $member->custom1); Index: Rolodex.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/Rolodex.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Rolodex.php 7 Jul 2008 13:30:15 -0000 1.15 --- Rolodex.php 17 Jul 2008 13:50:21 -0000 1.16 *************** *** 1048,1051 **** --- 1048,1053 ---- $this->member->setPrivacy($_POST['privacy']); + $this->member->setEmail_privacy($_POST['email_privacy']); + if (isset($_POST['custom1'])) { $this->member->setCustom1($_POST['custom1']); Index: RDX_Member.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Member.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RDX_Member.php 7 Jul 2008 13:30:15 -0000 1.14 --- RDX_Member.php 17 Jul 2008 13:50:21 -0000 1.15 *************** *** 70,73 **** --- 70,74 ---- var $image = null; var $privacy = 0; + var $email_privacy = 0; var $active = 1; var $custom1 = null; *************** *** 956,959 **** --- 957,966 ---- + function setEmail_privacy($email_privacy) + { + $this->email_privacy = $email_privacy; + } + + function setActive($active) { *************** *** 1210,1220 **** if ($this->isDataVisible('privacy_contact')) { ! $tpl['CONTACT_EMAIL'] = $this->getDisplay_email(true); ! $tpl['CONTACT_EMAIL_LABEL'] = dgettext('rolodex', 'E-mail'); } if ($this->isDataVisible('privacy_web')) { ! $tpl['WEBSITE'] = $this->getWebsite(true); ! $tpl['WEBSITE_LABEL'] = dgettext('rolodex', 'Web'); } --- 1217,1234 ---- 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'); ! } } if ($this->isDataVisible('privacy_web')) { ! if ($this->getWebsite()) { ! $tpl['WEBSITE'] = $this->getWebsite(true); ! $tpl['WEBSITE_LABEL'] = dgettext('rolodex', 'Web'); ! } } *************** *** 1360,1364 **** $tpl['THUMBNAIL'] = $this->getThumbnail(true, true); if ($this->isDataVisible('privacy_contact')) { ! $tpl['CONTACT_EMAIL_LINK'] = $this->getDisplay_email(true, true); } if ($this->isDataVisible('privacy_web')) { --- 1374,1382 ---- $tpl['THUMBNAIL'] = $this->getThumbnail(true, true); if ($this->isDataVisible('privacy_contact')) { ! if ($this->email_privacy && !Current_User::getId()) { ! $tpl['CONTACT_EMAIL_LINK'] = ''; ! } else { ! $tpl['CONTACT_EMAIL_LINK'] = $this->getDisplay_email(true, true); ! } } if ($this->isDataVisible('privacy_web')) { |