Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Modified paths (css, js) to work even if adminer is not running in subdir #3

Closed
wants to merge 1 commit into from

2 participants

@volftomas

Modified paths (css, js) to work even if adminer is not running in subdirectory called adminer, so it can now works even on paths like:

  • /index.php
  • m-lh/index.php
  • adminer123/index.php
@vrana
Owner

This would break Adminer Editor.

There's XSS.

@vrana vrana closed this
@volftomas

Oh, do not know that. Please, can you tell me or give me a clue how to get adminer working at url "http://m-lh/"?

Thank you

@vrana
Owner

I would recommend using the compiled version (there's a script compile.php).

@volftomas

ok, thank you

@volftomas volftomas Modified paths (css, js) to work even if adminer is not running in su…
…bdirectory called adminer, so it can now works even on paths like:

- /index.php
- m-lh/index.php
- adminer123/index.php
34d0787
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 16, 2011
  1. @volftomas

    Modified paths (css, js) to work even if adminer is not running in su…

    volftomas authored
    …bdirectory called adminer, so it can now works even on paths like:
    
    - /index.php
    - m-lh/index.php
    - adminer123/index.php
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 adminer/include/design.inc.php
View
8 adminer/include/design.inc.php
@@ -22,13 +22,13 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex">
<title><?php echo $title_page; ?></title>
-<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico" id="favicon">
-<link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
+<link rel="shortcut icon" type="image/x-icon" href="<?php dirname($_SERVER['PHP_SELF']); ?>/static/favicon.ico" id="favicon">
+<link rel="stylesheet" type="text/css" href="<?php dirname($_SERVER['PHP_SELF']); ?>/static/default.css">
<script type="text/javascript">
var areYouSure = '<?php echo lang('Resend POST data?'); ?>';
</script>
-<script type="text/javascript" src="../adminer/static/functions.js"></script>
-<script type="text/javascript" src="static/editing.js"></script>
+<script type="text/javascript" src="<?php dirname($_SERVER['PHP_SELF']); ?>/static/functions.js"></script>
+<script type="text/javascript" src="<?php dirname($_SERVER['PHP_SELF']); ?>/static/editing.js"></script>
<?php if ($adminer->head() && file_exists("adminer.css")) { ?>
<link rel="stylesheet" type="text/css" href="adminer.css">
<?php } ?>
Something went wrong with that request. Please try again.