svn: /web/doc-editor/trunk/ index.php
[email protected] (Chan Ka Shing)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
mrkschan Wed, 06 Jan 2010 10:10:01 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=293173
Log:
add proper handler for invalid xmlid used in permlink access
Changed paths:
U web/doc-editor/trunk/index.php
Modified: web/doc-editor/trunk/index.php
===================================================================
--- web/doc-editor/trunk/index.php 2010-01-06 08:30:47 UTC (rev 293172)
+++ web/doc-editor/trunk/index.php 2010-01-06 10:10:01 UTC (rev 293173)
@@ -49,7 +49,11 @@
$r = RepositoryFetcher::getInstance()->getFileByXmlID($_lang, $xmlid);
- $directAccess = 'var directAccess = {"lang":"'.$r->lang.'", "path":"'.$r->path.'", "name":"'.$r->name.'"};';
+ if (false == is_null($r)) {
+ $directAccess = 'var directAccess = {"lang":"'.$r->lang.'", "path":"'.$r->path.'", "name":"'.$r->name.'"};';
+ } else {
+ $directAccess = 'var directAccess = false;';
+ }
} else {
$directAccess = 'var directAccess = false;';