Page MenuHomeDevCentral

D3869.diff
No OneTemporary

D3869.diff

diff --git a/workspaces/src/Engines/I18n/TextFileMessage.php b/workspaces/src/Engines/I18n/TextFileMessage.php
--- a/workspaces/src/Engines/I18n/TextFileMessage.php
+++ b/workspaces/src/Engines/I18n/TextFileMessage.php
@@ -47,7 +47,7 @@
//Finds relevant files
$files = scandir($folder);
foreach ($files as $file) {
- if (string_starts_with($file, $filename . '-') && get_extension($file) == 'txt') {
+ if (str_starts_with($file, $filename . '-') && get_extension($file) == 'txt') {
$lang = substr($file, strlen($filename) + 1, -4);
if (strpos($lang, '-') !== false) {
//The user have quux-lang.txt and quux-foo-lang.txt files
diff --git a/workspaces/src/includes/GlobalFunctions.php b/workspaces/src/includes/GlobalFunctions.php
--- a/workspaces/src/includes/GlobalFunctions.php
+++ b/workspaces/src/includes/GlobalFunctions.php
@@ -40,22 +40,6 @@
return substr($file, 0, $dotPosition);
}
-/*
- * Determines if a string starts with specified substring
- * @param string $haystack the string to check
- * @param string $needle the substring to determines if it's the start
- * @param boolean $case_sensitive determines if the search must be case sensitive
- * @return boolean true if $haystack starts with $needle ; otherwise, false.
- */
-function string_starts_with ($haystack, $needle, $case_sensitive = true) {
- if (!$case_sensitive) {
- $haystack = strtoupper($haystack);
- $needle = strtoupper($needle);
- }
- if ($haystack == $needle) return true;
- return strpos($haystack, $needle) === 0;
-}
-
////////////////////////////////////////////////////////////////////////////////
/// ///
/// URL helpers functions ///

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 20, 12:29 (17 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3188135
Default Alt Text
D3869.diff (1 KB)

Event Timeline