You are here

function _google_appliance_shift_path_up in Google Search Appliance 7

Same name and namespace in other branches
  1. 8 src/Service/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 ./google_appliance.callback.click.php
Exhaustive depth-first search to try and locate the Drupal root directory.

File

./google_appliance.callback.click.php, line 22
The callback for the Google Appliance module's /click service.

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);
}