You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Callback functions hooking to the "article_posted" and "article_saved" are fed with the raw POST data. Which itself is fine. Due to this, on the "article_posted" event callback functions don't get the article's ID that was saved. Safe to assume, most that hook to these will need it.
While the ID is available with infamously named global variable, putting it to the actual data map could be beneficial. At least it simplified code of callback's members, and if I'm not mistaken, the bigger picture on the pipeline is to get rid of these infamously named global variables as "$ID", "$DB", "$vars" and such.
And well, the change wouldn't be more than about 10 characters counting couple spaces.
Please see attached patch. The patch does the mentioned and adds the posted article's ID to the $rs array.
From jukka.svahn@rahinaa.biz on July 22, 2012 20:30:24
Callback functions hooking to the "article_posted" and "article_saved" are fed with the raw POST data. Which itself is fine. Due to this, on the "article_posted" event callback functions don't get the article's ID that was saved. Safe to assume, most that hook to these will need it.
While the ID is available with infamously named global variable, putting it to the actual data map could be beneficial. At least it simplified code of callback's members, and if I'm not mistaken, the bigger picture on the pipeline is to get rid of these infamously named global variables as "$ID", "$DB", "$vars" and such.
And well, the change wouldn't be more than about 10 characters counting couple spaces.
Please see attached patch. The patch does the mentioned and adds the posted article's ID to the $rs array.
Attachment: txp_article.php.r3995.patch
Original issue: http://code.google.com/p/textpattern/issues/detail?id=229
The text was updated successfully, but these errors were encountered: