|
From: Verdon V. <ve...@us...> - 2008-07-26 20:57:42
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23449/class Modified Files: RDX_Feature.php RDX_Forms.php RDX_Location.php Rolodex.php Log Message: 1.1.0 changes Index: RDX_Feature.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Feature.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RDX_Feature.php 7 Jul 2008 13:30:15 -0000 1.5 --- RDX_Feature.php 26 Jul 2008 20:57:18 -0000 1.6 *************** *** 150,159 **** $vars['feature'] = $this->id; ! if (Current_User::allow('rolodex', 'settings')){ $vars['aop'] = 'edit_feature'; $links[] = PHPWS_Text::secureLink(dgettext('rolodex', 'Edit'), 'rolodex', $vars); - } - if (Current_User::allow('rolodex', 'settings')){ $vars['aop'] = 'delete_feature'; $js['ADDRESS'] = PHPWS_Text::linkAddress('rolodex', $vars, true); --- 150,157 ---- $vars['feature'] = $this->id; ! if (Current_User::allow('rolodex', 'settings', null, null, true)){ $vars['aop'] = 'edit_feature'; $links[] = PHPWS_Text::secureLink(dgettext('rolodex', 'Edit'), 'rolodex', $vars); $vars['aop'] = 'delete_feature'; $js['ADDRESS'] = PHPWS_Text::linkAddress('rolodex', $vars, true); *************** *** 174,178 **** { $links = array(); ! if (Current_User::allow('rolodex', 'settings')) { $vars['feature'] = $this->id; $vars['aop'] = 'edit_feature'; --- 172,176 ---- { $links = array(); ! if (Current_User::allow('rolodex', 'settings', null, null, true)) { $vars['feature'] = $this->id; $vars['aop'] = 'edit_feature'; Index: RDX_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Forms.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** RDX_Forms.php 25 Jul 2008 12:28:15 -0000 1.22 --- RDX_Forms.php 26 Jul 2008 20:57:18 -0000 1.23 *************** *** 141,145 **** $link = 'index.php?module=rolodex&aop=menu'; ! if (Current_User::allow('rolodex', 'settings')){ $tags['settings'] = array('title'=>dgettext('rolodex', 'Settings'), 'link'=>$link); --- 141,145 ---- $link = 'index.php?module=rolodex&aop=menu'; ! if (Current_User::allow('rolodex', 'settings', null, null, true)){ $tags['settings'] = array('title'=>dgettext('rolodex', 'Settings'), 'link'=>$link); *************** *** 152,158 **** 'link'=>$link); } - } - if (Current_User::isUnrestricted('rolodex')) { $tags['utilities'] = array('title'=>dgettext('rolodex', 'Utilities'), 'link'=>$link); } --- 152,156 ---- *************** *** 432,436 **** $num = $pager->getTotalRows(); if ($num == '0') { ! if (Current_User::allow('rolodex', 'settings')) { $vars['aop'] = 'menu'; $vars['tab'] = 'settings'; --- 430,434 ---- $num = $pager->getTotalRows(); if ($num == '0') { ! if (Current_User::allow('rolodex', 'settings', null, null, true)) { $vars['aop'] = 'menu'; $vars['tab'] = 'settings'; *************** *** 441,445 **** } } ! if (Current_User::allow('rolodex', 'settings')) { $vars['aop'] = 'new_location'; $ptags['ADD_LINK'] = PHPWS_Text::secureLink(dgettext('rolodex', 'Add Location'), 'rolodex', $vars); --- 439,443 ---- } } ! if (Current_User::allow('rolodex', 'settings', null, null, true)) { $vars['aop'] = 'new_location'; $ptags['ADD_LINK'] = PHPWS_Text::secureLink(dgettext('rolodex', 'Add Location'), 'rolodex', $vars); *************** *** 470,474 **** $num = $pager->getTotalRows(); if ($num == '0') { ! if (Current_User::allow('rolodex', 'settings')) { $vars['aop'] = 'menu'; $vars['tab'] = 'settings'; --- 468,472 ---- $num = $pager->getTotalRows(); if ($num == '0') { ! if (Current_User::allow('rolodex', 'settings', null, null, true)) { $vars['aop'] = 'menu'; $vars['tab'] = 'settings'; *************** *** 479,483 **** } } ! if (Current_User::allow('rolodex', 'settings')) { $vars['aop'] = 'new_feature'; $ptags['ADD_LINK'] = PHPWS_Text::secureLink(dgettext('rolodex', 'Add Feature'), 'rolodex', $vars); --- 477,481 ---- } } ! if (Current_User::allow('rolodex', 'settings', null, null, true)) { $vars['aop'] = 'new_feature'; $ptags['ADD_LINK'] = PHPWS_Text::secureLink(dgettext('rolodex', 'Add Feature'), 'rolodex', $vars); *************** *** 551,560 **** $tpl['ALPHA_CLICK'] = $this->rolodex->alpha_click(); ! $tpl['LOCATION_SELECT'] = $this->rolodex->getItemSelect('location', null, 'locations'); ! $tpl['FEATURE_SELECT'] = $this->rolodex->getItemSelect('feature', null, 'features'); ! $tpl['CATEGORY_SELECT'] = $this->rolodex->getCatSelect(null, 'categories'); ! $tpl['LOCATION_LABEL'] = dgettext('rolodex', 'Location(s)'); ! $tpl['FEATURE_LABEL'] = dgettext('rolodex', 'Feature(s)'); ! $tpl['CATEGORY_LABEL'] = dgettext('rolodex', 'Category(s)'); $tpl['CRITERIA_LABEL'] = dgettext('rolodex', 'Criteria'); $tpl['SEARCH_LABEL'] = dgettext('rolodex', 'Search'); --- 549,564 ---- $tpl['ALPHA_CLICK'] = $this->rolodex->alpha_click(); ! if (PHPWS_Settings::get('rolodex', 'use_locations')) { ! $tpl['LOCATION_SELECT'] = $this->rolodex->getItemSelect('location', null, 'locations'); ! $tpl['LOCATION_LABEL'] = dgettext('rolodex', 'Location(s)'); ! } ! if (PHPWS_Settings::get('rolodex', 'use_features')) { ! $tpl['FEATURE_SELECT'] = $this->rolodex->getItemSelect('feature', null, 'features'); ! $tpl['FEATURE_LABEL'] = dgettext('rolodex', 'Feature(s)'); ! } ! if (PHPWS_Settings::get('rolodex', 'use_categories')) { ! $tpl['CATEGORY_SELECT'] = $this->rolodex->getCatSelect(null, 'categories'); ! $tpl['CATEGORY_LABEL'] = dgettext('rolodex', 'Category(s)'); ! } $tpl['CRITERIA_LABEL'] = dgettext('rolodex', 'Criteria'); $tpl['SEARCH_LABEL'] = dgettext('rolodex', 'Search'); *************** *** 605,609 **** $form->addCheckbox('use_categories', 1); $form->setMatch('use_categories', PHPWS_Settings::get('rolodex', 'use_categories')); ! $form->setLabel('use_categories', dgettext('rolodex', 'Enable Categories')); $form->addCheckbox('use_locations', 1); --- 609,613 ---- $form->addCheckbox('use_categories', 1); $form->setMatch('use_categories', PHPWS_Settings::get('rolodex', 'use_categories')); ! $form->setLabel('use_categories', dgettext('rolodex', 'Enable Categories (uses core Categories)')); $form->addCheckbox('use_locations', 1); *************** *** 1328,1336 **** $tpl['TITLE'] = dgettext('rolodex', 'Important Information'); $tpl['INFO_1_LABEL'] = dgettext('rolodex', 'About this module:'); ! $tpl['INFO_1'] = dgettext('rolodex', 'This is the first full release of Rolodex for phpwebsite (phpws). Rolodex is a new module for phpws 1.5 or better. It is a complete rewrite of my earlier module phpwsbusinesses, for the earlier series of phpws. If you were familiar with that module, you will be familiar with many of Rolodex\'s features.'); $tpl['INFO_2_LABEL'] = null; ! $tpl['INFO_2'] = dgettext('rolodex', 'Roldex brings many new features and is even more configurable than phpwsbusinesses. Rolodex also takes full advantage of the new phpws core Demographics module. This module allows the sharing of user demographic information across all modules in a phpws.'); $tpl['INFO_3_LABEL'] = dgettext('rolodex', 'Bugs:'); ! $tpl['INFO_3'] = sprintf(dgettext('rolodex', 'Please report any bugs or observations of this beta release in %s this post at phpwsforums.com %s'), '<a href="http://phpwsforums.com/showthread.php?t=5969" target="new">', '</a>'); $tpl['INFO_4_LABEL'] = null; $tpl['INFO_4'] = null; --- 1332,1340 ---- $tpl['TITLE'] = dgettext('rolodex', 'Important Information'); $tpl['INFO_1_LABEL'] = dgettext('rolodex', 'About this module:'); ! $tpl['INFO_1'] = dgettext('rolodex', 'Rolodex is a new module for phpwebsite 1.5 or better. It is a complete rewrite of my earlier module phpwsbusinesses, for the earlier series of phpws. If you were familiar with that module, you will be familiar with many of Rolodex\'s features.'); $tpl['INFO_2_LABEL'] = null; ! $tpl['INFO_2'] = dgettext('rolodex', 'Roldex brings many new features and is even more configurable than phpwsbusinesses. Rolodex also takes full advantage of the new phpws core Demographics module. That module allows the sharing of user demographic information across all modules in a phpws.'); $tpl['INFO_3_LABEL'] = dgettext('rolodex', 'Bugs:'); ! $tpl['INFO_3'] = sprintf(dgettext('rolodex', 'Please report any bugs or observations of this module in %s this post at phpwsforums.com %s'), '<a href="http://phpwsforums.com/showthread.php?t=5969" target="new">', '</a>'); $tpl['INFO_4_LABEL'] = null; $tpl['INFO_4'] = null; Index: RDX_Location.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Location.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RDX_Location.php 7 Jul 2008 13:30:15 -0000 1.5 --- RDX_Location.php 26 Jul 2008 20:57:18 -0000 1.6 *************** *** 149,158 **** $vars['location'] = $this->id; ! if (Current_User::allow('rolodex', 'settings')){ $vars['aop'] = 'edit_location'; $links[] = PHPWS_Text::secureLink(dgettext('rolodex', 'Edit'), 'rolodex', $vars); - } - if (Current_User::allow('rolodex', 'settings')){ $vars['aop'] = 'delete_location'; $js['ADDRESS'] = PHPWS_Text::linkAddress('rolodex', $vars, true); --- 149,156 ---- $vars['location'] = $this->id; ! if (Current_User::allow('rolodex', 'settings', null, null, true)){ $vars['aop'] = 'edit_location'; $links[] = PHPWS_Text::secureLink(dgettext('rolodex', 'Edit'), 'rolodex', $vars); $vars['aop'] = 'delete_location'; $js['ADDRESS'] = PHPWS_Text::linkAddress('rolodex', $vars, true); *************** *** 173,177 **** { $links = array(); ! if (Current_User::allow('rolodex', 'settings')) { $vars['location'] = $this->id; $vars['aop'] = 'edit_location'; --- 171,175 ---- { $links = array(); ! if (Current_User::allow('rolodex', 'settings', null, null, true)) { $vars['location'] = $this->id; $vars['aop'] = 'edit_location'; Index: Rolodex.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/Rolodex.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Rolodex.php 25 Jul 2008 12:28:15 -0000 1.19 --- Rolodex.php 26 Jul 2008 20:57:18 -0000 1.20 *************** *** 734,743 **** } ! if (Current_User::allow('rolodex', 'settings')){ $tags['settings'] = array('title'=>dgettext('rolodex', 'Settings & Utilities'), 'link'=>$link); } ! if (Current_User::allow('rolodex', 'settings')){ $tags['info'] = array('title'=>dgettext('rolodex', 'Read me'), 'link'=>$link); --- 734,743 ---- } ! if (Current_User::allow('rolodex', 'settings', null, null, true)){ $tags['settings'] = array('title'=>dgettext('rolodex', 'Settings & Utilities'), 'link'=>$link); } ! if (Current_User::allow('rolodex', 'settings', null, null, true)){ $tags['info'] = array('title'=>dgettext('rolodex', 'Read me'), 'link'=>$link); *************** *** 1588,1598 **** } - // $db = new PHPWS_DB('rolodex_feature'); - // $features = $db->count(); if ($categories > 0 || $locations > 0 || $features > 0) { $links[] = PHPWS_Text::moduleLink(dgettext('rolodex', 'Advanced'), "rolodex", array('uop'=>'advanced')); } ! if (Current_User::allow('rolodex', 'settings') && !$_REQUEST['aop']){ $links[] = PHPWS_Text::moduleLink(dgettext('rolodex', 'Settings'), "rolodex", array('aop'=>'menu', 'tab'=>'settings')); } --- 1588,1596 ---- } if ($categories > 0 || $locations > 0 || $features > 0) { $links[] = PHPWS_Text::moduleLink(dgettext('rolodex', 'Advanced'), "rolodex", array('uop'=>'advanced')); } ! if (Current_User::allow('rolodex', 'settings', null, null, true) && !$_REQUEST['aop']){ $links[] = PHPWS_Text::moduleLink(dgettext('rolodex', 'Settings'), "rolodex", array('aop'=>'menu', 'tab'=>'settings')); } |