[geeklog-cvs] geeklog-1.3/public_html/admin/plugins/staticpages index.php,1.28,1.29
dhaun at geeklog.net
dhaun at geeklog.net
Fri Jan 2 17:10:05 EST 2004
Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin/plugins/staticpages
In directory geeklog_prod:/tmp/cvs-serv11415/admin/plugins/staticpages
Modified Files:
index.php
Log Message:
Implemented option to have "plain" PHP in Static Pages, i.e. without the need for a 'return' statement.
Index: index.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/plugins/staticpages/index.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** index.php 29 Dec 2003 13:44:43 -0000 1.28
--- index.php 2 Jan 2004 22:10:03 -0000 1.29
***************
*** 190,208 ****
if (SEC_hasRights ('staticpages.PHP')) {
if ($A['sp_php'] == 1) {
! $sp_template->set_var('php_checked','checked');
! $sp_template->set_var('php_type','checkbox');
! } else {
! $sp_template->set_var('php_checked','');
}
! $sp_template->set_var('php_type','checkbox');
! $sp_template->set_var('php_warn',$LANG_STATIC['php_warn']);
! $sp_template->set_var('php_msg',$LANG_STATIC['php_msg']);
} else {
! $sp_template->set_var('php_type','hidden');
! $sp_template->set_var('php_warn','');
! $sp_template->set_var('php_msg','');
! $sp_template->set_var('php_checked','');
}
if ($A['sp_nf'] == 1) {
--- 190,221 ----
if (SEC_hasRights ('staticpages.PHP')) {
+ $selection = '<select name="sp_php">' . LB;
+ $selection .= '<option value="0"';
+ if (($A['sp_php'] <= 0) || ($A['sp_php'] > 2)) {
+ $selection .= ' selected="selected"';
+ }
+ $selection .= '>' . $LANG_STATIC['select_php_none'] . '</option>' . LB;
+ $selection .= '<option value="1"';
if ($A['sp_php'] == 1) {
! $selection .= ' selected="selected"';
}
! $selection .= '>' . $LANG_STATIC['select_php_return'] . '</option>' . LB;
! $selection .= '<option value="2"';
! if ($A['sp_php'] == 2) {
! $selection .= ' selected="selected"';
! }
! $selection .= '>' . $LANG_STATIC['select_php_free'] . '</option>' . LB;
! $selection .= '</select>';
! $sp_template->set_var ('php_selector', $selection);
! $sp_template->set_var ('php_warn', $LANG_STATIC['php_warn']);
! $sp_template->set_var ('php_msg', $LANG_STATIC['php_msg']);
} else {
! $sp_template->set_var ('php_selector', '');
! $sp_template->set_var ('php_warn', '');
! $sp_template->set_var ('php_msg', '');
}
+ // old variables (for the 1.3-type checkbox)
+ $sp_template->set_var ('php_checked', '');
+ $sp_template->set_var ('php_type', 'hidden');
if ($A['sp_nf'] == 1) {
More information about the geeklog-cvs
mailing list