Преглед изворни кода

Restore old author() functions for extension compatibility (#2030)

Was breaking e.g. https://github.com/kevinpapst/freshrss-dilbert
Alexandre Alapetite пре 7 година
родитељ
комит
21e2409b9f
1 измењених фајлова са 8 додато и 0 уклоњено
  1. 8 0
      app/Models/Entry.php

+ 8 - 0
app/Models/Entry.php

@@ -44,6 +44,10 @@ class FreshRSS_Entry extends Minz_Model {
 	public function title() {
 		return $this->title;
 	}
+	public function author() {
+		//Deprecated
+		return $this->authors(true);
+	}
 	public function authors($asString = false) {
 		if ($asString) {
 			return $this->authors == null ? '' : ';' . implode('; ', $this->authors);
@@ -129,6 +133,10 @@ class FreshRSS_Entry extends Minz_Model {
 		$this->hash = null;
 		$this->title = $value;
 	}
+	public function _author($value) {
+		//Deprecated
+		$this->_authors($value);
+	}
 	public function _authors($value) {
 		$this->hash = null;
 		if (!is_array($value)) {