aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/directory.php13
-rw-r--r--view/js/main.js6
2 files changed, 15 insertions, 4 deletions
diff --git a/mod/directory.php b/mod/directory.php
index d71a5584a..8dbed4115 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -199,13 +199,18 @@ function directory_content(&$a) {
$a->data['directory_keywords'] = $j['keywords'];
}
- logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DEBUG);
+ logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DATA);
if($_REQUEST['aj']) {
- $o = replace_macros(get_markup_template('directajax.tpl'),array(
- '$entries' => $entries
- ));
+ if($entries) {
+ $o = replace_macros(get_markup_template('directajax.tpl'),array(
+ '$entries' => $entries
+ ));
+ }
+ else {
+ $o = '<div id="content-complete"></div>';
+ }
echo $o;
killme();
}
diff --git a/view/js/main.js b/view/js/main.js
index 417063b5a..919a569bd 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -408,6 +408,12 @@
function updatePageItems(mode,data) {
+
+ var e = data.getElementById('content-complete');
+ if(e) {
+ pageHasMoreContent = false;
+ }
+
if(mode === 'append') {
$(data).each(function() {
$('#page-end').before($(this));