summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-26 12:01:31 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-26 12:01:31 +0100
commitf6876166263797b8ff9f14ffb7f592fbb02e9274 (patch)
tree2761d30219d5b07641c6b40fa3ec56f286bc7e26
parentdd18ea611bd0e66969df22aedddc98cddbba4984 (diff)
parent4fcab9869497eb0109506069305f858a1a4a5a4e (diff)
downloadnextcloud-server-f6876166263797b8ff9f14ffb7f592fbb02e9274.tar.gz
nextcloud-server-f6876166263797b8ff9f14ffb7f592fbb02e9274.zip
Merge pull request #20745 from owncloud/remove-unused-internal-methods
Remove unused internal methods
-rw-r--r--lib/private/helper.php31
-rw-r--r--lib/public/util.php4
-rw-r--r--tests/lib/helper.php12
3 files changed, 2 insertions, 45 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index ee2f520fe2b..109b9b7ac08 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -645,37 +645,6 @@ class OC_Helper {
}
/**
- * replaces a copy of string delimited by the start and (optionally) length parameters with the string given in replacement.
- *
- * @param string $string
- * @param string $replacement The replacement string.
- * @param int $start If start is positive, the replacing will begin at the start'th offset into string. If start is negative, the replacing will begin at the start'th character from the end of string.
- * @param int $length Length of the part to be replaced
- * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
- * @return string
- * @deprecated 8.2.0 Use substr_replace() instead.
- */
- public static function mb_substr_replace($string, $replacement, $start, $length = 0, $encoding = 'UTF-8') {
- return substr_replace($string, $replacement, $start, $length);
- }
-
- /**
- * Replace all occurrences of the search string with the replacement string
- *
- * @param string $search The value being searched for, otherwise known as the needle.
- * @param string $replace The replacement
- * @param string $subject The string or array being searched and replaced on, otherwise known as the haystack.
- * @param string $encoding The encoding parameter is the character encoding. Defaults to UTF-8
- * @param int $count If passed, this will be set to the number of replacements performed.
- * @return string
- * @deprecated 8.2.0 Use str_replace() instead.
- *
- */
- public static function mb_str_replace($search, $replace, $subject, $encoding = 'UTF-8', &$count = null) {
- return str_replace($search, $replace, $subject, $count);
- }
-
- /**
* performs a search in a nested array
* @param array $haystack the array to be searched
* @param string $needle the search string
diff --git a/lib/public/util.php b/lib/public/util.php
index 07bc47c18b4..50fe9185006 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -544,7 +544,7 @@ class Util {
* @deprecated 8.2.0 Use substr_replace() instead.
*/
public static function mb_substr_replace($string, $replacement, $start, $length = null, $encoding = 'UTF-8') {
- return(\OC_Helper::mb_substr_replace($string, $replacement, $start, $length, $encoding));
+ return substr_replace($string, $replacement, $start, $length);
}
/**
@@ -560,7 +560,7 @@ class Util {
* @deprecated 8.2.0 Use str_replace() instead.
*/
public static function mb_str_replace($search, $replace, $subject, $encoding = 'UTF-8', &$count = null) {
- return(\OC_Helper::mb_str_replace($search, $replace, $subject, $encoding, $count));
+ return str_replace($search, $replace, $subject, $count);
}
/**
diff --git a/tests/lib/helper.php b/tests/lib/helper.php
index ca3e0e46d82..85655c69e63 100644
--- a/tests/lib/helper.php
+++ b/tests/lib/helper.php
@@ -164,18 +164,6 @@ class Test_Helper extends \Test\TestCase {
$this->assertEquals($result, $expected);
}
- function testMb_substr_replace() {
- $result = OC_Helper::mb_substr_replace("This is a teststring", "string", 5);
- $expected = "This string is a teststring";
- $this->assertEquals($result, $expected);
- }
-
- function testMb_str_replace() {
- $result = OC_Helper::mb_str_replace("teststring", "string", "This is a teststring");
- $expected = "This is a string";
- $this->assertEquals($result, $expected);
- }
-
function testRecursiveArraySearch() {
$haystack = array(
"Foo" => "own",