Skip to content

Commit

Permalink
Merge pull request #110 from mjrider/bugfixes-95
Browse files Browse the repository at this point in the history
Fixes  from production enviroments
  • Loading branch information
poef committed May 11, 2016
2 parents 29e0f1a + 2bfaea4 commit 60ba61e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
6 changes: 6 additions & 0 deletions lib/includes/loader.web.php
Expand Up @@ -1212,3 +1212,9 @@ function ldProcessRequest($AR_PATH_INFO=null) {
echo $image;
}
}

function ldGetPutHandle() {
$stdin = fopen("php://input", "r");
return new ar_content_filesFile($stdin);
}

20 changes: 11 additions & 9 deletions lib/templates/pobject/explore.browse.php
Expand Up @@ -112,13 +112,15 @@

$object_list = ar::get($eventData['path'])
->find($query)
->limit($eventData['limit'], $eventData['offset'])
->limit($eventData['limit'])
->offset($eventData['offset'])
->order($eventData['order'])
->call($eventData['template'], $eventData['args']);

$object_count = ar::get($eventData['path'])
->find($query)
->limit($eventData['limit'], $eventData['offset'])
->limit($eventData['limit'])
->offset($eventData['offset'])
->order($eventData['order'])
->count();

Expand All @@ -127,16 +129,16 @@

$colDefs = $eventData['args']['columns'];
foreach($colDefs as $colKey => $colDef ) {
if ( $colDef['hide'] ) {
unset($colDefs[$colKey]);
} else {
$colDefs[$colKey] = array_merge($colDef, [ 'key' => $colKey ]);
}
if ( $colDef['hide'] ) {
unset($colDefs[$colKey]);
} else {
$colDefs[$colKey] = array_merge($colDef, [ 'key' => $colKey ]);
}
}
$colDefs = array_values($colDefs);
$colDefs = array_values($colDefs);
$viewtype = $eventData['view'];
$items_per_page = $eventData['limit'];
$current_page = floor($eventData['offset'] / $eventData['limit']);
$current_page = 1 + floor($eventData['offset'] / $eventData['limit']);

if( $viewtype == "details" ) {
$datalist = array();
Expand Down

0 comments on commit 60ba61e

Please sign in to comment.