mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding patch from Ticket #1354
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4223 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
0ab73bb5fa
commit
dfbc6f0706
1 changed files with 1 additions and 10 deletions
|
@ -1331,18 +1331,9 @@
|
|||
* @return string with underscore remove from start and end of string
|
||||
*/
|
||||
function convertSlash($string) {
|
||||
$string = trim($string,"/");
|
||||
$string = preg_replace('/\/\//', '/', $string);
|
||||
$string = str_replace('/', '_', $string);
|
||||
$pos = strpos($string, '_');
|
||||
$pos1 = strrpos($string, '_');
|
||||
$char = strlen($string) - 1;
|
||||
if ($pos1 == $char) {
|
||||
$string = substr($string, 0, $char);
|
||||
}
|
||||
|
||||
if ($pos === 0) {
|
||||
$string = substr($string, 1);
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue