You are here

function _cleanpager_generate_current_page_url in Clean Pagination 7

Generate the current page url with page.

1 call to _cleanpager_generate_current_page_url()
cleanpager_init in ./cleanpager.module
Implements hook_init().

File

./cleanpager.module, line 137

Code

function _cleanpager_generate_current_page_url() {
  $path = cleanpager_path();
  if ($path && drupal_is_front_page()) {
    $path = '';
  }
  if (isset($_GET['page'])) {
    if (variable_get('cleanpager_use_additional_path', TRUE)) {
      $path .= ($path ? '/' : '') . CLEANPAGER_ADDITIONAL_PATH_VARIABLE;
    }
    $path .= ($path ? '/' : '') . $_GET['page'];
  }

  // Add the trailing slash.
  if ($path && variable_get('cleanpager_add_trailing', FALSE)) {
    $path .= '/';
  }
  return $path;
}