Unify title column
authorJoshua Rüsweg <josh@bastelstu.be>
Tue, 29 May 2018 11:44:41 +0000 (13:44 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Tue, 29 May 2018 11:44:41 +0000 (13:44 +0200)
See #2508

wcfsetup/install/files/lib/data/reaction/type/ReactionType.class.php
wcfsetup/setup/db/install.sql

index cbc9ffd32ae0a50a141416fe043af11f31ab1870..68a0a2cf78ce3e56197e80e40d2d9b2e5f650a37 100644 (file)
@@ -2,6 +2,7 @@
 declare(strict_types=1);
 namespace wcf\data\reaction\type;
 use wcf\data\DatabaseObject;
+use wcf\data\ITitledObject;
 use wcf\system\WCF;
 
 /**
@@ -14,7 +15,7 @@ use wcf\system\WCF;
  * @since       3.2
  *
  * @property-read      integer         $reactionTypeID         unique id of the reaction type
- * @property-read      string          $reactionTitle
+ * @property-read      string          $title
  * @property-read      integer         $type                   type of the reaction (1 is positive, 0 is neutral and -1 is negative)
  * @property-read      integer         $showOrder              position of the reaction type in relation to the other reaction types
  * @property-read      integer         $iconType               the icon type of the reaction
@@ -23,7 +24,7 @@ use wcf\system\WCF;
  * @property-read      string          $iconColor              the icon color
  * @property-read       integer                $isDisabled             is `1` if the reaction type is disabled and thus not shown, otherwise `0`
  */
-class ReactionType extends DatabaseObject {
+class ReactionType extends DatabaseObject implements ITitledObject {
        /**
         * The type value, if this reaction type is a positive reaction.
         * @var integer
@@ -63,7 +64,7 @@ class ReactionType extends DatabaseObject {
         * @inheritDoc
         */
        public function getTitle(): string {
-               return WCF::getLanguage()->get($this->reactionTitle);
+               return WCF::getLanguage()->get($this->title);
        }
        
        /**
index b36ff42439e972a7c14c3b69a6c6ea8ea68f64b2..379409994c1bb657638032b7803ab12526760a62 100644 (file)
@@ -1160,7 +1160,7 @@ CREATE TABLE wcf1_poll_option_vote (
 DROP TABLE IF EXISTS wcf1_reaction_type; 
 CREATE TABLE wcf1_reaction_type(
        reactionTypeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, 
-       reactionTitle VARCHAR(255), 
+       title VARCHAR(255), 
        type TINYINT(1),
        showOrder INT(10) NOT NULL DEFAULT 0,
        iconType TINYINT(1) DEFAULT 1,