Delete textblocks related to a round
Review Request #115 - Created Dec. 12, 2009 and submitted
Information | |
---|---|
Stefan Filip | |
infoarena | |
Reviewers | |
hackers | |
Show and delete all the pages that have a round name in their text.
-
/trunk/www/controllers/round.php (Diff revision 1) -
Evil spaces.
-
/trunk/www/controllers/round.php (Diff revision 1) -
Unproper ident.
-
/trunk/www/controllers/round.php (Diff revision 1) -
Ev space.
-
/trunk/www/controllers/round.php (Diff revision 1) -
Fix tabs.
-
/trunk/www/controllers/round.php (Diff revision 1) -
Make this controller_textblock_delete($textblocks) and move it to controller/textblock.php
-
/trunk/www/index.php (Diff revision 1) -
solve tabs here
-
/trunk/www/index.php (Diff revision 1) -
use spaces instead of tabs.
-
/trunk/www/index.php (Diff revision 1) -
trailing spaces.
-
/trunk/www/views/round_delete.php (Diff revision 1) -
Evil spaces.
-
/trunk/www/views/round_delete.php (Diff revision 1) -
Use 4 spaces tabs. Use expandtab in vim.
-
/trunk/www/views/round_delete.php (Diff revision 1) -
change name. html_code maybe?
-
/trunk/www/views/round_delete.php (Diff revision 1) -
weird space or tab.
-
/trunk/www/views/round_delete.php (Diff revision 1) -
Trailing spaces.
Review request changed
Almost done, please do check for tabs again though since I did manage to spot two lines with them.
-
trunk/common/db/textblock.php (Diff revision 2) -
Evil TABs
-
trunk/common/db/textblock.php (Diff revision 2) -
Evil TABs
-
trunk/www/controllers/round.php (Diff revision 2) -
evil empty line
-
trunk/www/controllers/textblock.php (Diff revision 2) -
You need to check if identity_can("textblock-delete", $page) here for each page. The passed $page parameter is a whole textblock, not just the name so you do have to textblock_get each one. Add another counter for not_deleted_because_of_permission, or something shorter, and show it to the user in the flashed message.
-
trunk/www/views/round_delete.php (Diff revision 2) -
You can delete this and format_operations.
Add a nice button/link in admin/runda/id to delete the round.
-
trunk/www/controllers/textblock.php (Diff revisions 2 - 3) -
Coding style dictates if (...) { ... } else { ... }
-
trunk/www/controllers/textblock.php (Diff revisions 2 - 3) -
Same coding style comment. I guess you can use flash_error at the second one. "din lipsa de permisiuni." sounds better :)
-
trunk/www/controllers/textblock.php (Diff revision 3) -
Check that $textblocks is an error and redirect the user with an error if not.
-
trunk/www/controllers/textblock.php (Diff revision 3) -
Also check that the textblock actually exists :) I think textblock_get_revision returns null if not.
-
trunk/www/views/round_delete.php (Diff revision 4) -
html_escape here.
-
trunk/www/views/round_delete.php (Diff revision 4) -
html_escape here.