SMF Development > Bug Reports
Repair Settings can't handle " in the DB password
emanuele:
Okay, found a potentially valid alternative for the regex:
--- Code: ---^[$]([a-zA-Z_]+)\s*=\s*(?:(["\'])(.*?["\'])(?:\\2)?|(.*?)(?:\\2)?);
--- End code ---
What does it mean?
Instead of try to do everything in one go, let's split the two cases and deal with them one at a time:
--- Code: ---(["\'])(.*?["\'])(?:\\2)?
--- End code ---
for strings in the form: $setting = 'texthere'; # anything else here
and
--- Code: ---(.*?)(?:\\2)?
--- End code ---
for settings like maintenance mode (i.e. $maintenance = 0; )
I pushed that to my "tools" repo.
Navigation
[0] Message Index
[*] Previous page
Go to full version