Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordpres.../lib/migratio...
File: adapter.php
}
[1000] Fix | Delete
[1001] Fix | Delete
/**
[1002] Fix | Delete
* Detect whether or not the string represents a function call and if so
[1003] Fix | Delete
* do not wrap it in single-quotes, otherwise do wrap in single quotes.
[1004] Fix | Delete
*
[1005] Fix | Delete
* @param string $text The string.
[1006] Fix | Delete
*
[1007] Fix | Delete
* @return bool Whether or not it's a SQL function call.
[1008] Fix | Delete
*/
[1009] Fix | Delete
private function is_sql_method_call( $text ) {
[1010] Fix | Delete
$text = \trim( $text );
[1011] Fix | Delete
if ( \substr( $text, -2, 2 ) === '()' ) {
[1012] Fix | Delete
return true;
[1013] Fix | Delete
}
[1014] Fix | Delete
return false;
[1015] Fix | Delete
}
[1016] Fix | Delete
[1017] Fix | Delete
/**
[1018] Fix | Delete
* Checks if a transaction is active.
[1019] Fix | Delete
*
[1020] Fix | Delete
* @return bool
[1021] Fix | Delete
*/
[1022] Fix | Delete
private function in_transaction() {
[1023] Fix | Delete
return $this->in_transaction;
[1024] Fix | Delete
}
[1025] Fix | Delete
[1026] Fix | Delete
/**
[1027] Fix | Delete
* Starts a transaction.
[1028] Fix | Delete
*
[1029] Fix | Delete
* @return void
[1030] Fix | Delete
*
[1031] Fix | Delete
* @throws Exception If a transaction was already started.
[1032] Fix | Delete
*/
[1033] Fix | Delete
private function begin_transaction() {
[1034] Fix | Delete
global $wpdb;
[1035] Fix | Delete
[1036] Fix | Delete
if ( $this->in_transaction === true ) {
[1037] Fix | Delete
throw new Exception( 'Transaction already started' );
[1038] Fix | Delete
}
[1039] Fix | Delete
$wpdb->query( 'START TRANSACTION' );
[1040] Fix | Delete
$this->in_transaction = true;
[1041] Fix | Delete
}
[1042] Fix | Delete
[1043] Fix | Delete
/**
[1044] Fix | Delete
* Commits a transaction.
[1045] Fix | Delete
*
[1046] Fix | Delete
* @return void
[1047] Fix | Delete
*
[1048] Fix | Delete
* @throws Exception If no transaction was strated.
[1049] Fix | Delete
*/
[1050] Fix | Delete
private function commit() {
[1051] Fix | Delete
global $wpdb;
[1052] Fix | Delete
[1053] Fix | Delete
if ( $this->in_transaction === false ) {
[1054] Fix | Delete
throw new Exception( 'Transaction not started' );
[1055] Fix | Delete
}
[1056] Fix | Delete
$wpdb->query( 'COMMIT' );
[1057] Fix | Delete
$this->in_transaction = false;
[1058] Fix | Delete
}
[1059] Fix | Delete
[1060] Fix | Delete
/**
[1061] Fix | Delete
* Rollbacks a transaction.
[1062] Fix | Delete
*
[1063] Fix | Delete
* @return void
[1064] Fix | Delete
*
[1065] Fix | Delete
* @throws Exception If no transaction was started.
[1066] Fix | Delete
*/
[1067] Fix | Delete
private function rollback() {
[1068] Fix | Delete
global $wpdb;
[1069] Fix | Delete
[1070] Fix | Delete
if ( $this->in_transaction === false ) {
[1071] Fix | Delete
throw new Exception( 'Transaction not started' );
[1072] Fix | Delete
}
[1073] Fix | Delete
$wpdb->query( 'ROLLBACK' );
[1074] Fix | Delete
$this->in_transaction = false;
[1075] Fix | Delete
}
[1076] Fix | Delete
}
[1077] Fix | Delete
[1078] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function