Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F925600
in-portal
No One
Temporary
Actions
View 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
Tue, May 20, 10:00 AM
Size
4 KB
Mime Type
text/x-diff
Expires
Thu, May 22, 10:00 AM (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
633568
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/admin/help/help.php
===================================================================
--- trunk/admin/help/help.php (revision 1237)
+++ trunk/admin/help/help.php (revision 1238)
@@ -1,137 +1,137 @@
<?php
if(!strlen($pathtoroot))
{
$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 */
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(!strlen($pathtoroot))
$pathtoroot = ".".$pathchar;
}
else
{
$pathtoroot = ".".$pathchar;
}
}
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if($sub!=$pathchar)
{
$pathtoroot = $pathtoroot.$pathchar;
}
//echo $pathtoroot;
require_once($pathtoroot."kernel/startup.php");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
-$baseURL = $_SERVER['DOCUMENT_ROOT'].$objConfig->Get("Site_Path");
+$baseURL = $pathtoroot; //.$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//admin only util
$pathtolocal = $pathtoroot."kernel/";
require_once ($pathtoroot.$admin."/include/elements.php");
//require_once ($pathtoroot."kernel/admin/include/navmenu.php");
//require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
$section = $_REQUEST["section"];
$envar = BuildEnv();
int_help_header();
$section = explode(':', $section);
if($section[0] == 'in-portal') $section[0] = 'kernel';
$topic_path = $baseURL.$section[0].'/'.$admin.'/include/help/'.$section[1].'.txt';
// for debugging: save new help content
if( GetVar('action') == 'save_help' )
{
error_reporting(E_ALL);
$fp = fopen($topic_path, 'w');
fwrite($fp, stripslashes(GetVar('help_content')) );
fclose($fp);
}
$help_data = file_exists($topic_path) ? file_get_contents($topic_path) : GetVar('help_content');
if($section[0] == 'kernel') $section[0] = 'in-portal';
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr>
<td bgcolor="F6F6F6">
<div class="help_box">
<?php
if( file_exists($topic_path) )
echo $help_data;
else
echo defined('DEBUG_HELP') ? 'missing section help file <b>'.$section[1].'.txt</b><br>' : admin_language('la_help_in_progress');
?>
</div>
<?php
if( defined('DEBUG_HELP') )
{
?>
<br><input type="button" onclick="document.save_help.submit();" value="Save Changes" style="font-weight: bolder; background-color: #F6F6F6;"><br>
<form name="save_help" id="save_help" method="post" action="<?php echo $_SERVER['PHP_SELF'].'?env='.$envar; ?>">
<textarea id="help_content" name="help_content" rows="15" cols="85"><?php echo $help_data; ?></textarea>
<input type="hidden" name="section" value="<?php echo implode(':',$section); ?>">
<input type="hidden" name="action" value="save_help">
<?php if( GetVar('help_usage') ) { ?>
<input type="hidden" name="help_usage" value="<?php echo GetVar('help_usage'); ?>">
<?php } ?>
</form>
<?php
}
?>
</td>
</tr>
</table>
<? int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/help/help.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.8
\ No newline at end of property
Event Timeline
Log In to Comment