Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1071897
in-portal
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 23, 6:20 AM
Size
6 KB
Mime Type
text/html
Expires
Fri, Jul 25, 6:20 AM (1 d, 12 h)
Engine
blob
Format
Raw Data
Handle
694541
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.1.96/root.flg
===================================================================
Index: branches/unlabeled/unlabeled-1.1.96/root.flg
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/root.flg (revision 6989)
+++ branches/unlabeled/unlabeled-1.1.96/root.flg (nonexistent)
Property changes on: branches/unlabeled/unlabeled-1.1.96/root.flg
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.6.2/admin/install/prerequisit_errors.php
===================================================================
--- branches/unlabeled/unlabeled-1.6.2/admin/install/prerequisit_errors.php (revision 6989)
+++ branches/unlabeled/unlabeled-1.6.2/admin/install/prerequisit_errors.php (revision 6990)
@@ -1,151 +1,81 @@
<?php
-define('THIS_FILE', 'admin/install/prerequisit_errors.php');
-define('IS_INSTALL',1);
-
-$pathtoroot = "";
-if( !(isset($pathtoroot) && $pathtoroot) )
-{
- //$path=dirname(realpath(__FILE__));PATH_TRANSLATED
- $path=dirname(realpath(__FILE__));
- if(strlen($path))
- {
- /* determine the OS type for path parsing */
- $pos = strpos($path,":");
- if ($pos === false)
- {
- $gOS_TYPE="unix";
- $pathchar = "/";
- }
- else
- {
- $gOS_TYPE="win";
- $pathchar="\\";
- }
- $p = $path.$pathchar;
- /*Start looking for the root flag file */
- if( !isset($pathtoroot) ) $pathtoroot = '';
- while(!strlen($pathtoroot) && strlen($p))
- {
- $sub = substr($p,strlen($pathchar)*-1);
- if($sub==$pathchar)
- {
- $filename = $p."root.flg";
- }
- else
- $filename = $p.$pathchar."root.flg";
- if(file_exists($filename))
- {
- $pathtoroot = $p;
- }
- else
- {
- $parent = realpath($p.$pathchar."..".$pathchar);
- if($parent!=$p)
- {
- $p = $parent;
- }
- else
- $p = "";
- }
- }
- if( !(isset($pathtoroot) && $pathtoroot) )
- $pathtoroot = ".".$pathchar;
- }
- else
- {
- $pathtoroot = ".".$pathchar;
- }
-}
-
-$sub = substr($pathtoroot,strlen($pathchar)*-1);
-if($sub!=$pathchar)
-{
- $pathtoroot = $pathtoroot.$pathchar;
-}
-
-function GetPathChar($path = null)
-{
- if( !isset($path) ) $path = $GLOBALS['pathtoroot'];
- $pos = strpos($path, ':');
- return ($pos === false) ? "/" : "\\";
-}
-$path_char = GetPathChar();
+// new path detection without K4 init: begin
+define('FULL_PATH', realpath(dirname(__FILE__).'/../..') );
+define('BASE_PATH', rtrim(preg_replace('#/admin/install$#', '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))), '/'));
+$rootURL = 'http://'.$_SERVER['HTTP_HOST'].rtrim(BASE_PATH, '/').'/admin/';
+// new path detection without K4 init: end
-$rootURL = 'http://'.dirname($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']);
-$rootURL = str_replace('/install','',$rootURL);
+$pathtoroot = FULL_PATH.'/';
+$admin = 'admin';
-$tmp = explode('/', $rootURL);
-if( $tmp[ count($tmp) - 1 ] == $admin) unset( $tmp[ count($tmp) - 1 ] );
-$rootURL = implode('/', $tmp).'/';
-unset($tmp);
+define('IS_INSTALL',1);
error_reporting('E_ALL');
ini_set('display_errors', 1);
require_once($pathtoroot."/kernel/startup.php");
-$prerequisit_path = $pathtoroot.$_GET['module'].$pathchar."admin".$pathchar."install".$pathchar."prerequisit.php";
+$prerequisit_path = $pathtoroot.$_GET['module'].'/admin/install/prerequisit.php';
if( function_exists('GetRegionalOption') )
{
$charset = GetRegionalOption('Charset');
}
else
{
$charset = 'iso-8859-1';
}
$rootURL .= 'admin/';
?>
<html>
<head>
<title>In-Portal - Module Errors</title>
<meta http-equiv="content-type" content="text/html;charset=<?php echo $charset; ?>">
<meta http-equiv="Pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="<?php echo $rootURL; ?>include/style.css">
</head>
<body topmargin="0" leftmargin="8" marginheight="8" marginwidth="8" bgcolor="#FFFFFF">
<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'>
<div style='position:absolute; width:100%;top:0px;' align='right'>
<img src='<?php echo $rootURL; ?>images/logo_bg.gif'>
</div>
<img src="<?php echo $rootURL; ?>images/spacer.gif" width="1" height="7"><br>
<div style='z-Index:1; position:relative'>
<!-- ADMIN TITLE -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td valign="top" class="admintitle" align="left">
<img alt="" width="46" height="46" src="<?php echo $rootURL; ?>install/ic_install.gif" align="absmiddle"> Module Errors<br>
<img src='<?php echo $rootURL; ?>images/spacer.gif' width=1 height=4><br>
</td></tr></table>
<!-- SECTION NAVIGATOR -->
<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30"><tr>
<TD class="header_left_bg" width="100%">
<span class="tablenav_link">Install</span>
</td>
<td align="right" class="tablenav" background="<?php echo $rootURL; ?>inst_bg.jpg" width="10">
</td>
</tr>
</table>
<!-- END SECTION NAVIGATOR -->
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr>
<td bgcolor="F6F6F6">
<div class="help_box">
<?php
- if( file_exists($prerequisit_path) )
- {
- $pathtoroot .= $pathchar;
- $show_errors = true;
- include_once($prerequisit_path);
+ if (file_exists($prerequisit_path)) {
+ $pathtoroot .= '/';
+ $show_errors = true;
+ include_once ($prerequisit_path);
}
?>
</h3> </div>
</td>
</tr>
</table>
</body>
</html>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.6.2/admin/install/prerequisit_errors.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.2.1
\ No newline at end of property
Event Timeline
Log In to Comment