public/wordpress/wp-content/plugins/backupbuddy/lib/dbreplace/dbreplace.php
/**
		 *	text()
		 *	
		 *	Replaces text within a table by specifying the table, rows to replace within and the old and new value(s).
		 *	
		 *	@param		string		$table		Table to replace text in.
		 *	@param		mixed		$olds		Old value(s) to find for replacement. May be a string or array of values.
		 *	@param		mixed		$news		New value(s) to be replaced with. May be a string or array. If array there must be the same number of values as $olds.
		 *	@param		mixed		$rows		Table row(s) to replace within. May be an array of tables.
		 *	@return		null
		 *
		 */
text()

Replaces text within a table by specifying the table, rows to replace within and the old and new value(s).

@param          string          $table          Table to replace text in.
@param          mixed           $olds           Old value(s) to find for replacement. May be a string or array of values.
@param          mixed           $news           New value(s) to be replaced with. May be a string or array. If array there must be the same number of values as $olds.
@param          mixed           $rows           Table row(s) to replace within. May be an array of tables.
@return         null
text () Replaces text within a table by specifying the table rows to replace within and the old and new value ( s ) . @param string $table Table to replace text in . @param mixed $olds Old value ( s ) to find for replacement . May be a string or array of values . @param mixed $news New value ( s ) to be replaced with . May be a string or array . If array there must be the same number of values as $olds . @param mixed $rows Table row ( s ) to replace within . May be an array of tables . @return null
public function text( $table, $olds, $news, $rows ) {
			$rows_sql = array();
			if ( !is_array( $olds ) ) {
				$olds = array( $olds );
			}
			if ( !is_array( $news ) ) {
				$news = array( $news );
			}
			if ( !is_array( $rows ) ) {
				$rows = array( $rows );
			}
			$this->remove_matching_array_elements( $olds, $news );
			foreach ( $rows as $row ) {
				$i = 0;
				foreach ( $olds as $old ) {
					$rows_sql[] = $row . " = replace( {$row}, '{$old}', '{$news[$i]}')";
					$i++;
				}
			}
			global $wpdb;
			$wpdb->query( "UPDATE `{$table}` SET " . implode( ',', $rows_sql ) . ";" );
			return true;
		}
public function text ( $ table , $ olds , $ news , $ rows ) { $ rows_sql = array ( ) ; if ( ! is_array ( $ olds ) ) { $ olds = array ( $ olds ) ; } if ( ! is_array ( $ news ) ) { $ news = array ( $ news ) ; } if ( ! is_array ( $ rows ) ) { $ rows = array ( $ rows ) ; } $ this -> remove_matching_array_elements ( $ olds , $ news ) ; foreach ( $ rows as $ row ) { $ i = 0 ; foreach ( $ olds as $ old ) { $ rows_sql [ ] = $ row . "  = replace(  { $ row } , ' { $ old } ', ' { $ news [ $ i ] } ') " ; $ i ++ ; } } global $ wpdb ; $ wpdb -> query ( " UPDATE ` { $ table } ` SET  " . implode ( ',' , $ rows_sql ) . " ; " ) ; return true ; }
text()
text ()
// Prevent trying to replace data with the same data for performance.