Skip to content

Commit

Permalink
Merge pull request #286 from RRZE-Webteam/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
rvdforst authored Aug 25, 2023
2 parents 799bf63 + 8f1243c commit b71fc02
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion class_Projekte.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ private function fetch_projects($year = '', $start = '', $end = '', $type = '',
$awardArray = [];

$filter = Tools::project_filter($year, $start, $end, $type, $status);
if (!is_wp_error($filter) && !empty($filter)) {
if (!is_wp_error($filter)) {
$ws = new CRIS_projects();
if ($this->einheit == "orga") {
$awardArray = $ws->by_orga_id($this->id, $filter);
Expand Down
6 changes: 3 additions & 3 deletions class_Publikationen.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public function projectPub($param = array()) {
$pubArray = [];

$filter = Tools::publication_filter($param['publications_year'], $param['publications_start'], $param['publications_end'], $param['publications_type'], $param['publications_subtype'], $param['publications_fau'], $param['publications_peerreviewed'], $param['publications_language']);
if (!is_wp_error($filter) && !empty($filter)) {
if (!is_wp_error($filter)) {
$ws = new CRIS_publications();
$pubArray = $ws->by_project($param['project'], $filter);
} else {
Expand Down Expand Up @@ -476,7 +476,7 @@ public function fieldPub($param = array(), $seed = false) {
$filter = Tools::publication_filter('', '', '', '', '', '', '', '', '1');

}
if (!is_wp_error($filter) && !empty($filter)) {
if (!is_wp_error($filter)) {
$ws = new CRIS_publications();
if ($seed) {
$ws->disable_cache();
Expand Down Expand Up @@ -561,7 +561,7 @@ private function fetch_publications($year = '', $start = '', $end = '', $type =
$pubArray = [];

$filter = Tools::publication_filter($year, $start, $end, $type, $subtype, $fau, $peerreviewed, $language);
if (!is_wp_error($filter) && !empty($filter)) {
if (!is_wp_error($filter)) {
$ws = new CRIS_publications();
if ($this->einheit === "orga") {
$pubArray = $ws->by_orga_id($this->id, $filter);
Expand Down
3 changes: 2 additions & 1 deletion class_Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ public static function publication_filter($year = '', $start = '', $end = '', $t
if ($curation == 1) {
$filter['relation curationsetting__eq'] = 'curation_accepted';
}
if (count($filter))
if (count($filter)) {
return $filter;
}
return null;
}

Expand Down
9 changes: 5 additions & 4 deletions fau-cris.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: FAU CRIS
* Description: Anzeige von Daten aus dem FAU-Forschungsportal CRIS in WP-Seiten
* Version: 3.19.0
* Version: 3.19.1
* Author: RRZE-Webteam
* Author URI: http://blogs.fau.de/webworking/
* Text Domain: fau-cris
Expand Down Expand Up @@ -60,7 +60,7 @@ class FAU_CRIS {
/**
* Get Started
*/
const version = '3.19.0';
const version = '3.19.1';
const option_name = '_fau_cris';
const version_option_name = '_fau_cris_version';
const textdomain = 'fau-cris';
Expand Down Expand Up @@ -822,6 +822,7 @@ public static function cris_shortcode($atts, $content = null, $tag = null) {
// Projekte
require_once('class_Projekte.php');
$liste = new Projekte($parameter['entity'], $parameter['entity_id'], $page_lang, $parameter['display_language']);

if(is_wp_error($liste)) {
return $liste->get_error_message();
}
Expand Down Expand Up @@ -868,9 +869,9 @@ public static function cris_shortcode($atts, $content = null, $tag = null) {
return $liste->pubListe($parameter);
}
if (strpos($parameter['order1'], 'type') !== false) {
return $liste->pubNachTyp($parameter, $field = '');
return $liste->pubNachTyp($parameter);
}
return $liste->pubNachJahr($parameter, $field = '');
return $liste->pubNachJahr($parameter);
}

// nothing
Expand Down

0 comments on commit b71fc02

Please sign in to comment.