fix pagination
This commit is contained in:
parent
5e0f013e49
commit
0f118e91c3
@ -378,7 +378,8 @@ switch ($serendipity['GET']['adminAction']) {
|
||||
serendipity_insertMediaProperty('base_hidden', '', $nm['image_id'], $hidden);
|
||||
}
|
||||
}
|
||||
showMediaLibrary($messages);
|
||||
|
||||
showMediaLibrary($messages, true);
|
||||
|
||||
break;
|
||||
|
||||
@ -822,7 +823,9 @@ switch ($serendipity['GET']['adminAction']) {
|
||||
break;
|
||||
}
|
||||
|
||||
function showMediaLibrary($messages=false) {
|
||||
function showMediaLibrary($messages=false, $addvar_check = false) {
|
||||
global $serendipity;
|
||||
|
||||
if (!serendipity_checkPermission('adminImagesView')) {
|
||||
return;
|
||||
}
|
||||
@ -835,13 +838,11 @@ function showMediaLibrary($messages=false) {
|
||||
echo '</ul></div>';
|
||||
}
|
||||
|
||||
global $image_selector_addvars;
|
||||
#if $image_selector_addvars is not empty, this was called by
|
||||
#serendipity_admin_image_selector.php and the library shall not be displayed (yet).
|
||||
if (!empty($image_selector_addvars)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// After upload, do not show the list to be able to proceed to
|
||||
// media selection.
|
||||
if ($addvar_check && !empty($GLOBALS['image_selector_addvars'])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
@ -858,6 +859,7 @@ function showMediaLibrary($messages=false) {
|
||||
if (!isset($serendipity['thumbPerPage'])) {
|
||||
$serendipity['thumbPerPage'] = 2;
|
||||
}
|
||||
|
||||
serendipity_displayImageList(
|
||||
isset($serendipity['GET']['page']) ? $serendipity['GET']['page'] : 1,
|
||||
$serendipity['thumbPerPage'],
|
||||
|
@ -1467,7 +1467,7 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
|
||||
$perPage++;
|
||||
}
|
||||
$start = ($page-1) * $perPage;
|
||||
|
||||
|
||||
if ($manage && $limit_path == NULL) {
|
||||
## SYNCH START ##
|
||||
$aExclude = array("CVS" => true, ".svn" => true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user