You are here

function shift_path_up in Production check & Production monitor 7

Same name and namespace in other branches
  1. 6 prod_check.dbconnect.php \shift_path_up()

Based on _drush_shift_path_up().

1 call to shift_path_up()
locate_root in ./prod_check.dbconnect.php
Locate the actual Drupal root. Based on drush_locate_root().

File

./prod_check.dbconnect.php, line 63
Simple database connection check that can be placed anywhere within a Drupal installation. Does NOT need to be in the root where index.php resides!

Code

function shift_path_up($path) {
  if (empty($path)) {
    return FALSE;
  }
  $path = explode('/', $path);

  // Move one directory up.
  array_pop($path);
  return implode('/', $path);
}