[eluser]mawe[/eluser]
Hi all!
The topic pretty much says it all. I have this in a controller:
Code:
function delete($news_id)
{
if ($this->News_Model->delete($news_id) === TRUE)
{
$this->session->set_flashdata('deleted', TRUE);
}
else
{
$this->session->set_flashdata('deleted', FALSE);
}
redirect(base_url().'admin/news/archive', 'location');
}
In the archive view I had this:
Code:
<?php if ($this->session->flashdata('deleted')): ?>
<?php if ($this->session->flashdata('deleted') === TRUE): ?>
<p class="success">News gelöscht!</p>
<?php else: ?>
<p class="error">News konnte nicht gelöscht werden!</p>
<?php endif; ?>
<?php endif; ?>
The inner if (the one that checks for TRUE) doesn't work. I examined the session and the flashdata item is actually '1', a string, not boolean TRUE.
Is this expected behaviour?