remove unused namespace imports and functions
This commit is contained in:
parent
7ea37a1790
commit
30a2852bad
@ -3,7 +3,6 @@
|
||||
use PicoFarad\Router;
|
||||
use PicoFarad\Response;
|
||||
use PicoFarad\Request;
|
||||
use PicoFarad\Session;
|
||||
use PicoFarad\Template;
|
||||
use PicoFeed\Syndication\Atom;
|
||||
|
||||
|
@ -172,6 +172,7 @@ Router\post_action('config', function() {
|
||||
)));
|
||||
});
|
||||
|
||||
// Get configuration parameters (AJAX request)
|
||||
Router\post_action('get-config', function() {
|
||||
$return = array();
|
||||
$options = Request\values();
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
use PicoFarad\Router;
|
||||
use PicoFarad\Response;
|
||||
use PicoFarad\Request;
|
||||
use PicoFarad\Session;
|
||||
use PicoFarad\Template;
|
||||
|
||||
// Flush console messages
|
||||
|
@ -3,7 +3,6 @@
|
||||
use PicoFarad\Router;
|
||||
use PicoFarad\Response;
|
||||
use PicoFarad\Request;
|
||||
use PicoFarad\Session;
|
||||
use PicoFarad\Template;
|
||||
|
||||
// Display history page
|
||||
|
@ -3,7 +3,6 @@
|
||||
use PicoFarad\Router;
|
||||
use PicoFarad\Response;
|
||||
use PicoFarad\Request;
|
||||
use PicoFarad\Session;
|
||||
use PicoFarad\Template;
|
||||
|
||||
// Display unread items
|
||||
@ -126,17 +125,6 @@ Router\post_action('download-item', function() {
|
||||
Response\json($download);
|
||||
});
|
||||
|
||||
// Ajax call change item status
|
||||
Router\post_action('change-item-status', function() {
|
||||
|
||||
$id = Request\param('id');
|
||||
|
||||
Response\json(array(
|
||||
'item_id' => $id,
|
||||
'status' => Model\Item\switch_status($id)
|
||||
));
|
||||
});
|
||||
|
||||
// Ajax call to mark item read
|
||||
Router\post_action('mark-item-read', function() {
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
use PicoFarad\Router;
|
||||
use PicoFarad\Response;
|
||||
use PicoFarad\Request;
|
||||
use PicoFarad\Session;
|
||||
use PicoFarad\Template;
|
||||
|
||||
// Logout and destroy session
|
||||
|
@ -4,7 +4,6 @@ namespace Model\AutoUpdate;
|
||||
|
||||
use ZipArchive;
|
||||
use DirectoryIterator;
|
||||
use RecursiveIterator;
|
||||
use RecursiveIteratorIterator;
|
||||
use RecursiveDirectoryIterator;
|
||||
use Model\Config;
|
||||
|
@ -7,7 +7,6 @@ use Model\Config;
|
||||
use PicoDb\Database;
|
||||
use PicoFeed\Logging\Logger;
|
||||
use PicoFeed\Client\Grabber;
|
||||
use PicoFeed\Filter\Filter;
|
||||
|
||||
// Get all items without filtering
|
||||
function get_all()
|
||||
@ -327,37 +326,6 @@ function set_bookmark_value($id, $value)
|
||||
->save(array('bookmark' => $value));
|
||||
}
|
||||
|
||||
// Swap item status read <-> unread
|
||||
function switch_status($id)
|
||||
{
|
||||
$item = Database::get('db')
|
||||
->table('items')
|
||||
->columns('status')
|
||||
->eq('id', $id)
|
||||
->findOne();
|
||||
|
||||
if ($item['status'] == 'unread') {
|
||||
|
||||
Database::get('db')
|
||||
->table('items')
|
||||
->eq('id', $id)
|
||||
->save(array('status' => 'read'));
|
||||
|
||||
return 'read';
|
||||
}
|
||||
else {
|
||||
|
||||
Database::get('db')
|
||||
->table('items')
|
||||
->eq('id', $id)
|
||||
->save(array('status' => 'unread'));
|
||||
|
||||
return 'unread';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
// Mark all unread items as read
|
||||
function mark_all_as_read()
|
||||
{
|
||||
|
@ -99,21 +99,6 @@ function refresh()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a session record
|
||||
*
|
||||
* @access public
|
||||
* @param integer $session_id Session id
|
||||
* @return mixed
|
||||
*/
|
||||
function remove($session_id)
|
||||
{
|
||||
return Database::get('db')
|
||||
->table(TABLE)
|
||||
->eq('id', $session_id)
|
||||
->remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the current RememberMe session and the cookie
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user