2014-07-23 15:52:50 +02:00
|
|
|
<?php
|
|
|
|
header('Content-Type: application/json; charset=UTF-8');
|
|
|
|
|
2015-02-08 18:55:48 +01:00
|
|
|
if (Minz_Request::param('is_read', true)) {
|
|
|
|
Minz_Request::_param('is_read', 0);
|
2014-07-23 15:52:50 +02:00
|
|
|
} else {
|
2015-02-08 18:55:48 +01:00
|
|
|
Minz_Request::_param('is_read', 1);
|
2014-07-23 15:52:50 +02:00
|
|
|
}
|
|
|
|
|
2015-02-08 18:55:48 +01:00
|
|
|
$url = Minz_Url::display(array(
|
|
|
|
'c' => Minz_Request::controllerName(),
|
|
|
|
'a' => Minz_Request::actionName(),
|
|
|
|
'params' => Minz_Request::params(),
|
2014-07-23 15:52:50 +02:00
|
|
|
));
|
|
|
|
|
2015-02-08 18:55:48 +01:00
|
|
|
echo json_encode(array('url' => str_ireplace('&', '&', $url), 'icon' => _i(Minz_Request::param('is_read') ? 'unread' : 'read')));
|