Skip to content

Instantly share code, notes, and snippets.

@3D-I
Forked from cYbercOsmOnauT/core.php
Created November 9, 2016 01:32
Show Gist options
  • Select an option

  • Save 3D-I/3fb868cbb148ce659806c5b44380b76d to your computer and use it in GitHub Desktop.

Select an option

Save 3D-I/3fb868cbb148ce659806c5b44380b76d to your computer and use it in GitHub Desktop.

Revisions

  1. @cYbercOsmOnauT cYbercOsmOnauT created this gist Jun 19, 2015.
    23 changes: 23 additions & 0 deletions core.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    public function expected_url($path = '')
    {
    $path = empty($path) ? $this->phpbb_root_path : $path;
    $params = array();

    // Check the params by the order they are in the request
    foreach($this->request->variable_names(\phpbb\request\request_interface::GET) AS $get) {
    $def = $this->seo_opt['zero_dupe']['redir_def'][$get];
    if (($this->request->is_set($get, \phpbb\request\request_interface::GET) && $def['keep']) || !empty($def['force']))
    {
    $params[$get] = $def['val'];

    if (!empty($def['hash']))
    {
    $params['#'] = $def['hash'];
    }
    }
    }

    $this->page_url = append_sid($path . $this->seo_opt['req_file'] . '.' . $this->php_ext, $params, true, 0);

    return $this->page_url;
    }