[pmwiki-users] Fix blogit for use with PHP 5.5

DaveG pmwiki at solidgone.com
Thu Oct 30 16:01:26 CDT 2014


I'm looking into PHP5 compatibility right now. Not progressing far, as I 
need to research exactly what I'm remediating, but hopefully have some 
progress soonish.


  ~ ~ David

On 10/30/2014 1:58 PM, Tiger!P wrote:
> On Thu, Oct 30, 2014 at 02:17:58PM +1300, John Rankin wrote:
>>
>>> On Mon, Oct 27, 2014 at 10:22:17AM +1300, John Rankin wrote:
>>>
>>> Hello John,
>>>
>
> [cut how to fix the Markup('blogit' line]
>
>>> This does not result in the error message, but when I go to the new blog
>>> page (/Site/BlogIt-Admin?action=bi_ne ) some blogit codes are displayed
>>> on the page. I don't know if this was the case before PHP5.5, but don't
>>> think so.
>>>
>>> Blog Title: (:blogit list "$:entrytype":)bi_PageType/Type:
>>> (:blogitend:)(:blogit list "$:blogid":)bi_BlogList/BlogID: (:blogitend:)
>>> Tags: (:blogit list "$:entrystatus":)bi_StatusType/Status:
>>> (:blogitend:)(:blogit list "$:entrycomments":)bi_CommentType/Comments:
>>> (:blogitend:)
>
> This problem still exists.
> And now the /Blog/Main page does not have any blog posts anymore. Also
> the list of recently written is empty.
> But the Categories contains a list of tags and when I select a tag, I
> see a link to the blogpost which has that tag.
>
> So I think something is not quite right yet.
>
> Hopefully DaveG can give some advice.
>
>>> When I save the new blog entry, I get still some deprecated messages:
>>> PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use
>>> preg_replace_callback instead in
>>> /home/tigerp/www/pmwiki-2.2.62/pmwiki.php on line 471
>>>
>>> So I think a little bit more needs to be done.
>>
>> It looks like there are a number of instances of the /e modifier which
>> need to be changed.
>>
>> In $bi_MakePageNamePatterns, it needs to remove the e, then use and
>> PCCF("return utf8toupper(\$m[1]);") and PCCF("return strtoupper(\$m[1]);")
>
> This solved the issue of the deprecated warnings in the log :-)
> Thank you for that.
>
>> Then all 3 calls to Markup need to be updated, in the same way as the
>> 'blogit' rule.
>
> I already did that before.
>
> Attached is a patch for blogit.php with the changes I made sofar.
>
> Tiger!P
>
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>



More information about the pmwiki-users mailing list