Error after upgrade to 3 when click on template editor [message #160444] |
Mon, 14 September 2009 16:45 |
littleking
Messages: 187 Registered: January 2007
Karma: 2
|
Senior Member |
|
|
Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d196178364/htdocs/huntohio/adm/admpanel.php:4) in /homepages/35/d196178364/htdocs/huntohio/adm/admtemplates.php on line 20
|
|
|
Re: Error after upgrade to 3 when click on template editor [message #160454 is a reply to message #160444] |
Mon, 14 September 2009 19:08 |
|
naudefj
Messages: 3771 Registered: December 2004
Karma: 28
|
Senior Member Administrator Core Developer |
|
|
Here is the fix:
$ cvs diff -ua admtemplates.php
Index: admtemplates.php
===================================================================
RCS file: /forum21/install/www_root/adm/admtemplates.php,v
retrieving revision 1.1
diff -u -a -r1.1 admtemplates.php
--- admtemplates.php 7 Sep 2009 15:49:52 -0000 1.1
+++ admtemplates.php 14 Sep 2009 19:03:53 -0000
@@ -14,13 +14,13 @@
fud_use('compiler.inc', true);
fud_use('theme.inc', true);
- require($WWW_ROOT_DISK . 'adm/admpanel.php');
-
if (isset($_POST['tname'], $_POST['tlang'], $_POST['btn_edit'])) {
header('Location: tmpllist.php?tname='.$_POST['tname'].'&tlang='.$_POST['tlang'].'&'.__adm_rsidl);
exit;
}
+ require($WWW_ROOT_DISK . 'adm/admpanel.php');
+
/* Limit theme names to sane characters */
if (isset($_POST['newname'], $_POST['btn_create'])) {
$_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', trim($_POST['newname']));
PS: I've applied it to CVS, but CVSTrac somehow doesn't show it.
|
|
|
Re: Error after upgrade to 3 when click on template editor [message #160455 is a reply to message #160454] |
Mon, 14 September 2009 19:18 |
littleking
Messages: 187 Registered: January 2007
Karma: 2
|
Senior Member |
|
|
now when i click edit, nothing happens
**/
require('./GLOBALS.php');
fud_use('adm.inc', true);
fud_use('compiler.inc', true);
fud_use('theme.inc', true);
require($WWW_ROOT_DISK . 'adm/admpanel.php');
/* Limit theme names to sane characters */
if (isset($_POST['newname'], $_POST['btn_create'])) {
$_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', trim($_POST['newname']));
} else {
$_POST['newname'] = '';
}
[Updated on: Mon, 14 September 2009 19:20] Report message to a moderator
|
|
|
|
Re: Error after upgrade to 3 when click on template editor [message #160459 is a reply to message #160458] |
Mon, 14 September 2009 19:33 |
littleking
Messages: 187 Registered: January 2007
Karma: 2
|
Senior Member |
|
|
mind being a little more verbose in your explanation?
require($WWW_ROOT_DISK . 'adm/admpanel.php');
/* Limit theme names to sane characters */
if (isset($_POST['newname'], $_POST['btn_create'])) {
$_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', trim($_POST['newname']));
/* Limit theme names to sane characters */
if (isset($_POST['newname'], $_POST['btn_create'])) {
$_POST['newname'] = preg_replace('![^A-Za-z0-9_]!', '_', trim($_POST['newname']));
} else {
$_POST['newname'] = '';
}
yeilds:
Parse error: syntax error, unexpected $end in /homepages/35/d196178364/htdocs/huntohio/adm/admtemplates.php on line 139
[Updated on: Mon, 14 September 2009 19:46] Report message to a moderator
|
|
|
|
|
|