Parent Directory | Revision Log
moved migration scripts to proper directory
1 | #!/usr/bin/perl -w |
2 | |
3 | |
4 | my $php; |
5 | |
6 | while(<STDIN>) { |
7 | next if (/textInmySQL/); |
8 | $php .= $_; |
9 | } |
10 | |
11 | sub fix_php { |
12 | my ($sql,$filler,$query) = @_; |
13 | |
14 | my @vars; |
15 | while ($sql =~ s/'*"\s*\.\s*(\$\w+)\s*\.\s*"'*/ ? /s) { |
16 | push @vars, $1; |
17 | } |
18 | |
19 | return $sql . $filler . 'xx_prepare_execute($sql, '.join(", ",@vars).')'; |
20 | } |
21 | |
22 | my $fixed = 0; |
23 | |
24 | $php =~ s/(\$sql\s*=\s*"[^;]+?;)(.+?)(xx_query\s*\(\$sql[^\)]+\))/fix_php($1,$2,$3)/seg; |
25 | |
26 | print $php; |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |