cvs: phpdoc /scripts/online_editor cvslist.php editxml.php
| From: | Philip Olson | Date: | Thu, 02 Oct 2008 02:09:51 +0000 |
| Subject: | cvs: phpdoc /scripts/online_editor cvslist.php editxml.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2189@lists.php.net to get a copy of this message | ||
philip Thu Oct 2 02:09:51 2008 UTC
Modified files:
/phpdoc/scripts/online_editor cvslist.php editxml.php
Log:
E_NOTICE removal
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/online_editor/cvslist.php?r1=1.4&r2=1.5&diff_format=u
Index: phpdoc/scripts/online_editor/cvslist.php
diff -u phpdoc/scripts/online_editor/cvslist.php:1.4 phpdoc/scripts/online_editor/cvslist.php:1.5
--- phpdoc/scripts/online_editor/cvslist.php:1.4 Sat May 31 09:23:35 2008
+++ phpdoc/scripts/online_editor/cvslist.php Thu Oct 2 02:09:51 2008
@@ -97,6 +97,7 @@
global $lang;
$px = explode('/', $path);
+ $pp = '';
foreach($px as $i=>$p) {
$pp .= $p.'/';
if (!$p && !$i) $p = $lang;
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/online_editor/editxml.php?r1=1.7&r2=1.8&diff_format=u
Index: phpdoc/scripts/online_editor/editxml.php
diff -u phpdoc/scripts/online_editor/editxml.php:1.7 phpdoc/scripts/online_editor/editxml.php:1.8
--- phpdoc/scripts/online_editor/editxml.php:1.7 Sat May 31 09:23:35 2008
+++ phpdoc/scripts/online_editor/editxml.php Thu Oct 2 02:09:51 2008
@@ -34,7 +34,7 @@
$_SESSION['split'] = $_REQUEST['split'];
}
-if ($_SESSION['split'] && !isset($_REQUEST['noframes'])) {
+if (!empty($_SESSION['split']) && !isset($_REQUEST['noframes'])) {
$source = $_REQUEST['source'];
$file = $_REQUEST['file'];
@@ -58,21 +58,21 @@
// Turn on/off XML as Text
-if ($_REQUEST['textedit'] && $_REQUEST['textedit']!='false')
{
+if (!empty($_REQUEST['textedit']) &&
$_REQUEST['textedit']!='false') {
$_SESSION['textedit'] = true;
} elseif ($_REQUEST['textedit']=='false') {
$_SESSION['textedit'] = false;
}
// Turn on/off Hiding XML tags when editing
-if ($_REQUEST['hidexml'] && $_REQUEST['hidexml']!='false') {
+if (!empty($_REQUEST['hidexml']) &&
$_REQUEST['hidexml']!='false') {
$_SESSION['hidexml'] = true;
} elseif ($_REQUEST['hidexml']=='false') {
$_SESSION['hidexml'] = false;
}
// Turn on/off Line By Line
-if ($_REQUEST['par'] && $_REQUEST['par']!='false') {
+if (!empty($_REQUEST['par']) && $_REQUEST['par']!='false') {
$_SESSION['para'] = false;
} elseif ($_REQUEST['par']=='false') {
$_SESSION['para'] = true;
@@ -101,7 +101,7 @@
} else {
if ($c=="\n") {
// Advance the counter so each line is stored separately
- if (!$_SESSION['para']) {
+ if (empty($_SESSION['para'])) {
$rc++;
} else {
if (!isset($results[$rc])) {
@@ -134,7 +134,7 @@
// Skip empty, &xx; and literals
if (!$res || ($res[0]=='&' && substr($res,-1)==';') ||
isLiteral($res) ) continue;
- if ($_SESSION['para']) {
+ if (!empty($_SESSION['para'])) {
// trim \n and adjust position
while(substr($resline['text'], 0, 1)=="\n" ||
substr($resline['text'], 0, 1)=="\r") {
$resline['index']++;
@@ -207,7 +207,7 @@
$data = implode('', file($file));
-if (!$_SESSION['textedit']) {
+if (empty($_SESSION['textedit'])) {
// Protect CDATA tags by hiding them before parsing
preg_match_all("#<\!\[CDATA\[(.+)\]\]>#Us", $data, $matches);
@@ -337,10 +337,13 @@
}
-if (!$_SESSION['textedit']) {
+if (empty($_SESSION['textedit'])) {
// Mark XML Tags to be hidden (when hidexml is true)
$hideXMLTag = $_SESSION['hidexml'];
+ $startXMLTag = '';
+ $endXMLTag = '';
+
if ($hideXMLTag) {
$startXMLTag = '_TMRK(';
$endXMLTag = ')TMRK_';
@@ -649,15 +652,15 @@
<?php
-if ($requireLogin) {
+if (!empty($requireLogin)) {
print "Logged as: <b>$user[email]</b> <a
href='login.php?and=logout' target=_top>logout</a><br>";
}
- $url = "editxml.php?file=$requestedFilename&source=$source";
- if ($_SESSION['hidexml']) $hideXML = 'checked'; else $hideXML = '';
- if ($_SESSION['split']) $splitFrames = 'checked'; else $splitFrames =
'';
- if ($_SESSION['textedit']) $textEdit = 'checked'; else $textEdit =
'';
- if ($_SESSION['para']) $lineByLine = ''; else $lineByLine =
'checked';
+$url = "editxml.php?file=$requestedFilename&source=$source";
+$hideXML = empty($_SESSION['hidexml']) ? '' : 'checked';
+$splitFrames= empty($_SESSION['split']) ? '' : 'checked';
+$textEdit = empty($_SESSION['textedit'])? '' : 'checked';
+$lineByLine = empty($_SESSION['para']) ? '' : 'checked';
?>
<input type=checkbox name=hidexml value=1 <?php print $hideXML; ?> onClick="if
(uconfirm()) document.location='<?php print $url;
?>&noframes=1&hidexml='+this.checked;" <?php if ($source=='diff')
print 'disabled'; ?> /> Hide XML Tags
@@ -699,7 +702,7 @@
}
-if (!$_SESSION['textedit'] || $source=='diff') {
+if (empty($_SESSION['textedit']) || $source=='diff') {
?>