[eluser]scherman[/eluser]
[quote author="CroNiX" date="1328859117"]Instead of redirecting from that function, why not just return TRUE/FALSE since that is what you are checking for here:
Code:
<?php if($article->publish): ?>
//render published.png (the green button)
<?php else: ?>
//render unpublished.png (the red button)
<?php endif ?>
[/quote]
I don't get it.
But to understand why i don't want to solve like this:
Another fail example is (the article's creation for example):
- The article's list is shown (articles/index)
- The user click "Add Article" (GO TO articles/create)
- The user fills the fields (articles/create)
- The user click "Create" (it reload articles/create)
- The success message is shown (articles/create)
- The user click "Back to the article's list" (GO TO articles/index)
- The new article DOESN'T APPEAR on the list
- The user press F5
- Now the article appears on the list
Did you see? I have the same problem with all the backend procedures!