[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: wcm/inc class.bosite.inc.php,1.16,1.17 class.uie
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: wcm/inc class.bosite.inc.php,1.16,1.17 class.uielement.inc.php,1.16,1.17 class.uipage.inc.php,1.18,1.19 |
Date: |
Sat, 23 Mar 2002 08:36:22 -0500 |
Update of /cvsroot/phpgroupware/wcm/inc
In directory subversions:/tmp/cvs-serv32312/inc
Modified Files:
class.bosite.inc.php class.uielement.inc.php
class.uipage.inc.php
Log Message:
Changes to allow for copying of pages and elements
Index: class.bosite.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.bosite.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.bosite.inc.php 28 Feb 2002 04:40:20 -0000 1.16
--- class.bosite.inc.php 23 Mar 2002 13:36:19 -0000 1.17
***************
*** 193,197 ****
$cfg = CreateObject('phpgwapi.config','wcm');
$cfg->read_repository();
! $acctid = $cfg->config_data['website_account'];
$acct = $GLOBALS['phpgw']->accounts->id2name($acctid);
$pass = $cfg->config_data['website_account_passwd'];
--- 193,197 ----
$cfg = CreateObject('phpgwapi.config','wcm');
$cfg->read_repository();
! $acctid = intval($cfg->config_data['website_account']);
$acct = $GLOBALS['phpgw']->accounts->id2name($acctid);
$pass = $cfg->config_data['website_account_passwd'];
Index: class.uielement.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.uielement.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.uielement.inc.php 28 Feb 2002 04:40:20 -0000 1.16
--- class.uielement.inc.php 23 Mar 2002 13:36:19 -0000 1.17
***************
*** 17,20 ****
--- 17,21 ----
'index' => True,
'edit' => True,
+ 'copy' => True,
'add' => True,
'delete' => True
***************
*** 215,218 ****
--- 216,220 ----
$GLOBALS['phpgw']->template->set_var('lang_default',lang('Default'));
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
+
$GLOBALS['phpgw']->template->set_var('lang_copy',lang('Copy'));
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
***************
*** 235,238 ****
--- 237,243 ----
));
+
$GLOBALS['phpgw']->template->set_var('copy',$GLOBALS['phpgw']->link('/index.php','menuaction=wcm.uielement.copy&element_id='
. $element_id));
+
$GLOBALS['phpgw']->template->set_var('lang_copy_entry',lang('Copy'));
+
$GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php','menuaction=wcm.uielement.edit&element_id='
. $element_id));
$GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit'));
***************
*** 245,248 ****
--- 250,265 ----
$GLOBALS['phpgw']->template->parse('out','element_list_t',True);
$GLOBALS['phpgw']->template->p('out');
+ }
+
+ function copy()
+ {
+ $element_id = $GLOBALS['HTTP_POST_VARS']['element_id']
? $GLOBALS['HTTP_POST_VARS']['element_id'] :
$GLOBALS['HTTP_GET_VARS']['element_id'];
+ $element = $this->bo->read($element_id);
+
+ unset($element['element_id']);
+ $element['element_name'] .= '_copy';
+ $element_info = $this->bo->edit($element);
+
+ Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=wcm.uielement.edit&element_id='
. $element_info['element_id']));
}
Index: class.uipage.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.uipage.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.uipage.inc.php 28 Feb 2002 04:40:20 -0000 1.18
--- class.uipage.inc.php 23 Mar 2002 13:36:19 -0000 1.19
***************
*** 18,21 ****
--- 18,22 ----
'view' => True,
'edit' => True,
+ 'copy' => True,
'add' => True,
'delete' => True
***************
*** 160,163 ****
--- 161,165 ----
$GLOBALS['phpgw']->template->set_var('lang_view',lang('View'));
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
+
$GLOBALS['phpgw']->template->set_var('lang_copy',lang('Copy'));
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
***************
*** 179,182 ****
--- 181,186 ----
$GLOBALS['phpgw']->template->set_var('lang_view_entry',lang('View'));
+
$GLOBALS['phpgw']->template->set_var('copy',$GLOBALS['phpgw']->link('/index.php','menuaction=wcm.uipage.copy&page_id='
. $page_id));
+
$GLOBALS['phpgw']->template->set_var('lang_copy_entry',lang('Copy'));
$GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php','menuaction=wcm.uipage.edit&page_id='
. $page_id));
$GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit'));
***************
*** 228,231 ****
--- 232,248 ----
echo '
</html>';
+ }
+
+ function copy()
+ {
+ $page_id = $GLOBALS['HTTP_POST_VARS']['page_id'] ?
$GLOBALS['HTTP_POST_VARS']['page_id'] : $GLOBALS['HTTP_GET_VARS']['page_id'];
+ $page = $this->bo->read($page_id);
+
+ unset($page['page_id']);
+ $page['page_name'] .= '_copy';
+ $page['page_url'] .= '!!!!!';
+ $page_info = $this->bo->edit($page);
+
+ Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=wcm.uipage.edit&page_id=' .
$page_info['page_id']));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: wcm/inc class.bosite.inc.php,1.16,1.17 class.uielement.inc.php,1.16,1.17 class.uipage.inc.php,1.18,1.19,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: wcm/website/templates frame.tpl,1.14,1.15
- Next by Date:
[Phpgroupware-cvs] CVS: wcm/templates/default listelements.tpl,1.6,1.7 listpages.tpl,1.6,1.7
- Previous by thread:
[Phpgroupware-cvs] CVS: wcm/website/templates frame.tpl,1.14,1.15
- Next by thread:
[Phpgroupware-cvs] CVS: wcm/templates/default listelements.tpl,1.6,1.7 listpages.tpl,1.6,1.7
- Index(es):