fix session lost
This commit is contained in:
parent
020545feb3
commit
0fe64adb7f
21
index.php
21
index.php
|
@ -22,6 +22,17 @@
|
|||
|
||||
session_start();
|
||||
|
||||
if (!isset($_SESSION['index']) || isset($_GET['reindex']) || empty($_SESSION['index']))
|
||||
{
|
||||
echo '<div class="grey">performed reindexing</div>';
|
||||
$files = glob($dir . '/*');
|
||||
usort($files, function($a, $b)
|
||||
{
|
||||
return filemtime($b) - filemtime($a);
|
||||
});
|
||||
$_SESSION['index'] = $files;
|
||||
}
|
||||
|
||||
function removefromindex($title)
|
||||
{
|
||||
global $dir;
|
||||
|
@ -173,16 +184,6 @@
|
|||
|
||||
echo '<div>';
|
||||
|
||||
if (!isset($_SESSION['index']) || isset($_GET['reindex']) || empty($_SESSION['index']))
|
||||
{
|
||||
$files = glob($dir . '/*');
|
||||
usort($files, function($a, $b)
|
||||
{
|
||||
return filemtime($b) - filemtime($a);
|
||||
});
|
||||
$_SESSION['index'] = $files;
|
||||
}
|
||||
|
||||
foreach($_SESSION['index'] as $path)
|
||||
{
|
||||
$tags = '';
|
||||
|
|
Loading…
Reference in New Issue