Update database and helper functionality in CodeIgniter
Revised database drivers, query builder, and file/inflector helpers for improved consistency and functionality. Updated copyrights, links, and standardized function names including deprecating `is_countable` in favor of `word_is_countable`. Added support for new SQL features and optimized query handling.
This commit is contained in:
@@ -42,7 +42,7 @@ if ( ! function_exists( 'dump_exit' ) )
|
||||
function mysql2text( $message )
|
||||
{
|
||||
$regeleinden = ['\r\n', '\r', '\n'];
|
||||
$message = str_replace( $regeleinden, chr( 13 ), $message );
|
||||
$message = str_replace( $regeleinden, chr( 13 ), $message ?? '' );
|
||||
$message = stripslashes( $message );
|
||||
|
||||
return ( $message );
|
||||
@@ -51,7 +51,7 @@ function mysql2text( $message )
|
||||
function mysql2html( $message )
|
||||
{
|
||||
$regeleinden = ['\r\n', '\r', '\n'];
|
||||
$message = str_replace( $regeleinden, "<br />", $message );
|
||||
$message = str_replace( $regeleinden, "<br />", $message ?? '' );
|
||||
$message = stripslashes( $message );
|
||||
|
||||
return ( $message );
|
||||
@@ -60,7 +60,7 @@ function mysql2html( $message )
|
||||
function textarea2html( $message )
|
||||
{
|
||||
$regeleinden = [chr( 13 )];
|
||||
$message = str_replace( $regeleinden, "<br />", $message );
|
||||
$message = str_replace( $regeleinden, "<br />", $message ?? '' );
|
||||
$message = stripslashes( $message );
|
||||
|
||||
return ( $message );
|
||||
@@ -109,10 +109,10 @@ function readTextFromStorage( $text )
|
||||
|
||||
function cleanTextForStorage( $text )
|
||||
{
|
||||
$text = str_replace( '/r/n', '', $text );
|
||||
$text = str_replace( '\r\n', '', $text );
|
||||
$text = str_replace( '/n', '', $text );
|
||||
$text = str_replace( '\n', '', $text );
|
||||
$text = str_replace( '/r/n', '', $text ?? '' );
|
||||
$text = str_replace( '\r\n', '', $text ?? '' );
|
||||
$text = str_replace( '/n', '', $text ?? '' );
|
||||
$text = str_replace( '\n', '', $text ?? '' );
|
||||
$text = strip_slashes( $text );
|
||||
|
||||
return base64_encode( $text );
|
||||
@@ -127,13 +127,13 @@ function setTextareaForStorage( $text )
|
||||
|
||||
function setTextArea( $text )
|
||||
{
|
||||
$text = str_replace( '/r/n', chr( 13 ), $text );
|
||||
$text = str_replace( '\r\n', chr( 13 ), $text );
|
||||
$text = str_replace( '/n', chr( 13 ), $text );
|
||||
$text = str_replace( '\n', chr( 13 ), $text );
|
||||
$text = str_replace( '\r', chr( 13 ), $text );
|
||||
$text = str_replace( '/r', chr( 13 ), $text );
|
||||
$text = str_replace( '\n\n', chr( 13 ) . chr( 13 ), $text );
|
||||
$text = str_replace( '/r/n', chr( 13 ), $text ?? '' );
|
||||
$text = str_replace( '\r\n', chr( 13 ), $text ?? '' );
|
||||
$text = str_replace( '/n', chr( 13 ), $text ?? '' );
|
||||
$text = str_replace( '\n', chr( 13 ), $text ?? '' );
|
||||
$text = str_replace( '\r', chr( 13 ), $text ?? '' );
|
||||
$text = str_replace( '/r', chr( 13 ), $text ?? '' );
|
||||
$text = str_replace( '\n\n', chr( 13 ) . chr( 13 ), $text ?? '' );
|
||||
$text = strip_slashes( $text );
|
||||
|
||||
return $text;
|
||||
@@ -141,13 +141,13 @@ function setTextArea( $text )
|
||||
|
||||
function setTextAreaHtml( $text )
|
||||
{
|
||||
$text = str_replace( '/r/n', '<br />', $text );
|
||||
$text = str_replace( '\r\n', '<br />', $text );
|
||||
$text = str_replace( '/n', '<br />', $text );
|
||||
$text = str_replace( '\n', '<br />', $text );
|
||||
$text = str_replace( '\r', '<br />', $text );
|
||||
$text = str_replace( '/r', '<br />', $text );
|
||||
$text = str_replace( '\n\n', '<br /><br />', $text );
|
||||
$text = str_replace( '/r/n', '<br />', $text ?? '' );
|
||||
$text = str_replace( '\r\n', '<br />', $text ?? '' );
|
||||
$text = str_replace( '/n', '<br />', $text ?? '' );
|
||||
$text = str_replace( '\n', '<br />', $text ?? '' );
|
||||
$text = str_replace( '\r', '<br />', $text ?? '' );
|
||||
$text = str_replace( '/r', '<br />', $text ?? '' );
|
||||
$text = str_replace( '\n\n', '<br /><br />', $text ?? '' );
|
||||
$text = strip_slashes( $text );
|
||||
|
||||
return $text;
|
||||
|
||||
Reference in New Issue
Block a user