浏览代码

fixing random functions

main
Simon Bowie 3 年前
父节点
当前提交
7ac63bc06a
共有 4 个文件被更改,包括 12 次插入9 次删除
  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 查看文件



include '../solr.php'; include '../solr.php';


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


?> ?>



+ 2
- 1
site/public/random_images.php 查看文件

include '../solr.php'; include '../solr.php';
include '../ops_api.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 查看文件



include '../solr.php'; include '../solr.php';


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


?> ?>



+ 6
- 6
site/solr.php 查看文件

return $output; return $output;
} }


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


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


foreach($random as $id => $content){ foreach($random as $id => $content){
// Search for the title in the content element and display it // Search for the title in the content element and display it
return $output; return $output;
} }


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


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


foreach($random as $id => $content){ foreach($random as $id => $content){
// Search for the abstract in the content element and display it // Search for the abstract in the content element and display it
return $output; return $output;
} }


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


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


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

正在加载...
取消
保存