Browse Source

fixing random functions

main
Simon Bowie 2 years ago
parent
commit
7ac63bc06a
4 changed files with 12 additions and 9 deletions
  1. +2
    -1
      site/public/abstracts.php
  2. +2
    -1
      site/public/random_images.php
  3. +2
    -1
      site/public/titles.php
  4. +6
    -6
      site/solr.php

+ 2
- 1
site/public/abstracts.php View File

@@ -9,7 +9,8 @@

include '../solr.php';

$random_abstracts = ten_random_abstracts();
$core = 'all';
$random_abstracts = ten_random_abstracts($core);

?>


+ 2
- 1
site/public/random_images.php View File

@@ -10,7 +10,8 @@
include '../solr.php';
include '../ops_api.php';

$random_doc_refs = ten_random_doc_refs();
$core = 'all';
$random_doc_refs = ten_random_doc_refs($core);

?>


+ 2
- 1
site/public/titles.php View File

@@ -9,7 +9,8 @@

include '../solr.php';

$random_titles = ten_random_titles();
$core = 'all';
$random_titles = ten_random_titles($core);

?>


+ 6
- 6
site/solr.php View File

@@ -160,10 +160,10 @@ function one_random_record ($core){
return $output;
}

function ten_random_titles (){
function ten_random_titles ($core){

for ($x=0; $x <= 9; $x++) {
$random = get_random_record();
$random = get_random_record($core);

foreach($random as $id => $content){
// Search for the title in the content element and display it
@@ -175,10 +175,10 @@ function ten_random_titles (){
return $output;
}

function ten_random_abstracts (){
function ten_random_abstracts ($core){

for ($x=0; $x <= 9; $x++) {
$random = get_random_record();
$random = get_random_record($core);

foreach($random as $id => $content){
// Search for the abstract in the content element and display it
@@ -194,11 +194,11 @@ function ten_random_abstracts (){
return $output;
}

function ten_random_doc_refs (){
function ten_random_doc_refs ($core){

$x = 0;
while ($x < 9) {
$random = get_random_record();
$random = get_random_record($core);

foreach($random as $id => $content){
//Set document reference number (used for OPS API)

Loading…
Cancel
Save