From: <flo...@us...> - 2009-07-14 15:11:42
|
Revision: 20120 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=20120&view=rev Author: floh1111 Date: 2009-07-14 15:11:36 +0000 (Tue, 14 Jul 2009) Log Message: ----------- Check if REQUEST_URI is set, removes Php notice if script is executed on command line Modified Paths: -------------- trunk/tiki-filter-base.php trunk/tiki-objectpermissions.php Modified: trunk/tiki-filter-base.php =================================================================== --- trunk/tiki-filter-base.php 2009-07-14 13:53:15 UTC (rev 20119) +++ trunk/tiki-filter-base.php 2009-07-14 15:11:36 UTC (rev 20120) @@ -44,7 +44,8 @@ // If unallowed chars (regarding to RFC1738) have been found in REQUEST_URI, then urlencode them $unallowed_uri_chars = array("'", '"', '<', '>', '{', '}', '|', '\\', '^', '~', '`'); $unallowed_uri_chars_encoded = array_map('urlencode', $unallowed_uri_chars); -$_SERVER['REQUEST_URI'] = str_replace($unallowed_uri_chars, $unallowed_uri_chars_encoded, $_SERVER['REQUEST_URI']); +if(isset($_SERVER['REQUEST_URI'])) + $_SERVER['REQUEST_URI'] = str_replace($unallowed_uri_chars, $unallowed_uri_chars_encoded, $_SERVER['REQUEST_URI']); // Same as above, but for PHP_SELF which does not contain URL params // Usually, PHP_SELF also differs from REQUEST_URI in that PHP_SELF is URL decoded and REQUEST_URI is exactly what the client sent Modified: trunk/tiki-objectpermissions.php =================================================================== --- trunk/tiki-objectpermissions.php 2009-07-14 13:53:15 UTC (rev 20119) +++ trunk/tiki-objectpermissions.php 2009-07-14 15:11:36 UTC (rev 20120) @@ -60,6 +60,10 @@ //Quickperms $perms = $userlib->get_permissions(0, -1, 'permName_asc', '', $_REQUEST["permType"], '', true); +echo "<pre>"; +print_r($perms); +echo "</pre>"; + foreach($perms['data'] as $perm) { if ($perm['level']=='basic') $quickperms_['basic'][$perm['permName']] = $perm['permName']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |