Skip to content

Commit

Permalink
Fix area redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
sinansalih committed Sep 13, 2019
1 parent c526f0e commit 24c1784
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions Ness/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ public static function RedirectToArea($Area = '', $controllerName = '', $action
*/
public static function getArea($willWork = true)
{
$application_query_data = conf::getQuery();
if (!empty($application_query_data['p'])) {
return $application_query_data['p'].'Area'.DIRECTORY_SEPARATOR;

$application_query_data = Url::getData("p");
if (!empty($application_query_data)) {
return $application_query_data.'Area'.DIRECTORY_SEPARATOR;
} else {
return '';
}
Expand Down Expand Up @@ -111,22 +112,25 @@ public static function getUrl()
}

/**
* Returns posted values in your url with 'get' method.
* Get parameter values from your url.
* If parameter not found returns False.Please
* set $paramid for getting a specific value. Set $paramid to Null
* for getting an array with parameters.
*
* @param string $paramid Name of your entry
*
* @return string Application query data.
*/
public static function getData($paramid = null)
{
$application_query_data = conf::getQuery();
if (is_null($paramid)) {
return $application_query_data;
} else {
if (empty($application_query_data[$paramid])) {
return '-1';
} else {
return $application_query_data[$paramid];
if(isset(parse_url(Url::getUrl())['query'])){
parse_str(parse_url(Url::getUrl())['query'], $query);
if(is_null($paramid)){
return $query;
}else{
if(!isset($query[$paramid])){
return false;
}else{
return $query[$paramid];
}
}
}
}
Expand Down

0 comments on commit 24c1784

Please sign in to comment.