Unindent
This commit is contained in:
parent
9df33e82e6
commit
346353153d
|
@ -431,9 +431,9 @@ function create_routine($routine, $row) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Remove current user definer from SQL command
|
/** Remove current user definer from SQL command
|
||||||
* @param string
|
* @param string
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function remove_definer($query) {
|
function remove_definer($query) {
|
||||||
return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user
|
return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue