From 88f87e15b402e5975a906b403e493ca233e0505d Mon Sep 17 00:00:00 2001 From: troy Date: Sun, 20 Mar 2022 12:07:25 +0100 Subject: [PATCH] openmgraph und hotfix in string --- og.php | 15 +++++++++++++++ string.php | 10 +++++----- 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 og.php diff --git a/og.php b/og.php new file mode 100644 index 0000000..fb644d4 --- /dev/null +++ b/og.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/string.php b/string.php index 2a4ef70..f0b6137 100644 --- a/string.php +++ b/string.php @@ -35,11 +35,11 @@ function noScript($str) { function random($name_laenge) { $zeichen = "abcedfghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ0123456789"; $name_neu = ""; - + @mt_srand ( ( double ) microtime () * 1000000 ); for($i = 0; $i < $name_laenge; $i ++) { $r = mt_rand ( 0, strlen ( $zeichen ) - 1 ); - $name_neu .= $zeichen {$r}; + $name_neu .= $zeichen[$r]; } return $name_neu; } @@ -49,7 +49,7 @@ function startsWith($haystack, $needle) { } function endsWith($haystack, $needle) { $length = strlen ( $needle ); - + return $length === 0 || (substr ( $haystack, - $length ) === $needle); } function onlyAlpha($str, $zus = '') { @@ -247,7 +247,7 @@ function onlySimpleHTML($s) { '
',
           '
'
   ), $s );
-  
+
   // cleanup
   $s = str_replace ( array (
           '{{|-',
@@ -256,7 +256,7 @@ function onlySimpleHTML($s) {
           '',
           ''
   ), $s );
-  
+
   return $s;
 }
 function linkify($input) {