Skip to content

Commit

Permalink
2.28.1
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjpearson committed Jan 18, 2021
1 parent e6c0204 commit 55a99b2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CareerDev.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CareerDev {
public static $passedModule = NULL;

public static function getVersion() {
return "2.28.0";
return "2.28.1";
}

public static function getLockFile($pid) {
Expand Down
6 changes: 4 additions & 2 deletions brag.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,15 @@
$recordCitations = $pubs->getSortedCitationsInTimespan($startTs, $endTs, "Included", FALSE);
foreach ($recordCitations as $citation) {
$pmid = $citation->getPMID();
if (in_array($pmid, $allPMIDs)) {
if (isset($allPMIDs[$pmid])) {
if (!isset($multipleScholarPMIDs[$pmid])) {
$multipleScholarPMIDs[$pmid] = [];
$multipleScholarPMIDs[$pmid][] = $allPMIDs[$pmid];
}
$multipleScholarPMIDs[$pmid][] = ["lastName" => $lastNames[$recordId], "firstName" => $firstNames[$recordId]];
} else {
$allCitations[] = $citation;
$allPMIDs[] = $pmid;
$allPMIDs[$pmid] = ["lastName" => $lastNames[$recordId], "firstName" => $firstNames[$recordId]];
}
}
}
Expand All @@ -107,6 +108,7 @@
}
$pmid = $citation->getPMID();
if (isset($multipleScholarPMIDs[$pmid])) {
// Application::log("Calling getCitation $pmid with multiple: ".REDCapManagement::json_encode_with_spaces($multipleScholarPMIDs[$pmid]));
$citationStr .= $citation->getCitation($multipleScholarPMIDs[$pmid]);
} else {
$citationStr .= $citation->getCitation();
Expand Down
2 changes: 2 additions & 0 deletions classes/Citation.php
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,13 @@ private static function addPeriodIfExtant($str) {

public function getCitation($multipleNamesToBold = []) {
if (!empty($multipleNamesToBold)) {
// Application::log("Has multiple names to bold: ".REDCapManagement::json_encode_with_spaces($multipleNamesToBold));
$authorList = $this->getAuthorList();
foreach ($multipleNamesToBold as $nameAry) {
$firstName = $nameAry["firstName"];
$lastName = $nameAry["lastName"];
$authorList = self::boldName($lastName, $firstName, $authorList);
// Application::log("Bolding $lastName $firstName: ".REDCapManagement::json_encode_with_spaces($authorList));
}
$authors = self::addPeriodIfExtant(implode(", ", $authorList));
} else {
Expand Down
1 change: 1 addition & 0 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use \Vanderbilt\CareerDevLibrary\REDCapManagement;
use \ExternalModules\ExternalModules;

ini_set("memory_limit", "4096M");
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Expand Down
2 changes: 2 additions & 0 deletions publications/updateBibliometrics.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php

use \Vanderbilt\CareerDevLibrary\Download;
use \Vanderbilt\CareerDevLibrary\Upload;
use \Vanderbilt\CareerDevLibrary\Publications;
use \Vanderbilt\CareerDevLibrary\Application;

require_once(dirname(__FILE__)."/../classes/Download.php");
require_once(dirname(__FILE__)."/../classes/Upload.php");
require_once(dirname(__FILE__)."/../Application.php");
require_once(dirname(__FILE__)."/../classes/Publications.php");

Expand Down
2 changes: 2 additions & 0 deletions publications/updateBibliometricsForOneRecord.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php

use \Vanderbilt\CareerDevLibrary\Download;
use \Vanderbilt\CareerDevLibrary\Upload;
use \Vanderbilt\CareerDevLibrary\Publications;
use \Vanderbilt\CareerDevLibrary\Application;

require_once(dirname(__FILE__)."/../classes/Download.php");
require_once(dirname(__FILE__)."/../classes/Upload.php");
require_once(dirname(__FILE__)."/../Application.php");
require_once(dirname(__FILE__)."/../classes/Publications.php");

Expand Down

0 comments on commit 55a99b2

Please sign in to comment.