You are here

function _google_appliance_shift_path_up in Google Search Appliance 8

Same name and namespace in other branches
  1. 7 google_appliance.callback.click.php \_google_appliance_shift_path_up()

Returns parent directory.

Parameters

$path: Path to start from.

Return value

Parent path of given path.

See also

_drush_shift_path_up()

1 call to _google_appliance_shift_path_up()
google_appliance_locate_root in src/Service/Click.php
Exhaustive depth-first search to try and locate the Drupal root directory.

File

src/Service/Click.php, line 39
Created by PhpStorm. User: mhavelant Date: 2017.05.23. Time: 18:01.

Code

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

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