Add missing security to old textblocks.
Review Request #99 - Created Nov. 28, 2009 and submitted
Information | |
---|---|
Bogdan-Cristian Tătăroiu | |
infoarena | |
Reviewers | |
hackers | |
Ticket #357 When viewing or diffing revisions that were made before security was coded, the site emits an error since the textblock doesn't have any security set and isn't valid now. On live you see just a white screen without any explination. Google Webmasters Tools is full of these kind of errors. This script searches through all revisions with invalid security and sets it to the security of the first revision in which security is specified.
-
trunk/scripts/textblock-add-missing-security (Diff revision 1) -
Use log_warn here. The script shouldn't die because of this. What if there are 100 pages with invalid security?
-
trunk/scripts/textblock-add-missing-security (Diff revision 1) -
What if we have a more recent revision that has an invalid security. I think it would be better for us to make sure we fetch a revision with valid security. Something like this: " AND (security IN ('public', 'private', 'protected') OR security LIKE 'task: %' AND security NOT LIKE 'round: %' "
-
trunk/scripts/textblock-add-missing-security (Diff revision 1) -
Issue a log_warn here. I don't think there should be pages without security.
-
trunk/scripts/textblock-add-missing-security (Diff revision 1) -
The point of this patch is to add security to textblocks that don't have it :P This is expected to happen