Re: Perhaps it's time for a new fork
"Janky Jay, III" <[email protected]> Sun, 14 Sep 2025 19:58:50 -0600
| Newsgroups | gmane.mail.virus.maiamailguard |
|---|---|
| Message-ID | <[email protected]> |
Yep. This would be my suggestion: sed -i.bak "s/old_code/new_code/g" *.php Regards, Janky Jay, III On 9/14/25 05:23PM, jjs - mainphrame wrote: > Thanks, now that you mention it, even a vim macro could do some of > the work. > > Or that classic perl one liner: perl -pi -e s/old/new/g <filename pattern> > > Joe > > On Sun, Sep 14, 2025 at 4:12 PM P.J. Tezza <[email protected]> wrote: > > Thanks for working on this - I kind of thought I'd be doing it, > but you beat me to it! > > Having done this type of work in the past, here is my recommendation: > > If there is is anything that can be done with search and replace > across files, use it. Even if there are a few different forms to > be changed, you may be able to run the search and replace once for > each form. The work often goes faster, it is less error prone and > if you later find a mistake, it is usually easier to resolve. > > PJ > > On 9/14/25 3:52 PM, jjs - mainphrame wrote: >> Apart from redefining the top level $maia_sql_dsn in config.php, >> most of the effort for my task is replacing code that looks like >> this: >> -- >> $res = $sth->execute(); >> if ($row = $res->fetchrow()) { >> -- >> with code that looks like this: >> -- >> $sth->execute(); >> if ($row = $sth->fetch(PDO::FETCH_ASSOC)) { >> -- >> on a file by file basis since every instance is a little >> different. It looks like there are a few dozen such files to fix. >> >> It's not much, but it's honest work. >> >> Joe >> >> >> >> >> On Thu, Sep 11, 2025 at 3:01 PM jjs - mainphrame >> <[email protected]> wrote: >> >> Since nobody else has committed to the effort, I'm willing to >> at least give it a try. >> >> I don't have unlimited time, but I'm going to start looking >> into updating the maia codebase to make it compatible with php 8. >> >> If anybody else wants to contribute, I'd welcome the help. >> >> Joe >> >> >> _______________________________________________ >> Maia-users mailing list >> [email protected] >> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users > _______________________________________________ > Maia-users mailing list > [email protected] > http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users > > > _______________________________________________ > Maia-users mailing list > [email protected] > http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users _______________________________________________ Maia-users mailing list [email protected] http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users