Fix wiki and qa implementation

This commit is contained in:
Dennis Eichhorn 2017-03-21 20:58:05 +01:00
parent f5bffcf7c3
commit 24c39e593c
6 changed files with 10 additions and 12 deletions

View File

@ -63,7 +63,7 @@ class Installer extends InstallerAbstract
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'wiki_badge` ( 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'wiki_badge` (
`wiki_badge_id` int(11) NOT NULL AUTO_INCREMENT, `wiki_badge_id` int(11) NOT NULL AUTO_INCREMENT,
`wiki_badge_name` varchar(255) NOT NULL, `wiki_badge_name` varchar(255) NOT NULL,
PRIMARY KEY (`wiki_category_id`) PRIMARY KEY (`wiki_badge_id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
)->execute(); )->execute();
@ -92,9 +92,9 @@ class Installer extends InstallerAbstract
$dbPool->get('core')->con->prepare( $dbPool->get('core')->con->prepare(
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'wiki_article_badge` ( 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'wiki_article_badge` (
`wiki_article_badge_id` int(11) NOT NULL AUTO_INCREMENT, `wiki_article_badge_id` int(11) NOT NULL AUTO_INCREMENT,
`wiki_article_badge_article` varchar(255) NOT NULL, `wiki_article_badge_article` int(11) NOT NULL,
`wiki_article_badge_badge` int(11) DEFAULT NULL, `wiki_article_badge_badge` int(11) DEFAULT NULL,
PRIMARY KEY (`wiki_category_id`), PRIMARY KEY (`wiki_article_badge_id`),
KEY `wiki_article_badge_article` (`wiki_article_badge_article`), KEY `wiki_article_badge_article` (`wiki_article_badge_article`),
KEY `wiki_article_badge_badge` (`wiki_article_badge_badge`) KEY `wiki_article_badge_badge` (`wiki_article_badge_badge`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'

View File

@ -33,7 +33,7 @@ class WikiCategory implements \JsonSerializable
private $name = ''; private $name = '';
private $parent = 0; private $parent = null;
public function __construct() public function __construct()
{ {
@ -55,7 +55,7 @@ class WikiCategory implements \JsonSerializable
$this->name = $name; $this->name = $name;
} }
public function getParent() : int public function getParent() /* : ?int */
{ {
return $this->parent; return $this->parent;
} }

View File

@ -97,7 +97,7 @@ class WikiDoc implements \JsonSerializable
$this->status = $status; $this->status = $status;
} }
public function getCategory() : int public function getCategory()
{ {
return $this->category; return $this->category;
} }

View File

@ -62,8 +62,8 @@ class WikiDocMapper extends DataMapperAbstract
'badges' => [ 'badges' => [
'mapper' => WikiBadgeMapper::class, 'mapper' => WikiBadgeMapper::class,
'table' => 'wiki_article_badge', 'table' => 'wiki_article_badge',
'dst' => 'wiki_article_badge_badge', 'dst' => 'wiki_article_badge_article',
'src' => 'wiki_article_badge_article', 'src' => 'wiki_article_badge_badge',
], ],
]; ];

View File

@ -29,7 +29,7 @@ use phpOMS\Datatypes\Enum;
* @link http://orange-management.com * @link http://orange-management.com
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class WikiStauts extends Enum abstract class WikiStatus extends Enum
{ {
/* public */ const ACTIVE = 1; /* public */ const ACTIVE = 1;

View File

@ -17,9 +17,7 @@
"description": "Knowledgebase module.", "description": "Knowledgebase module.",
"directory": "Knowledgebase", "directory": "Knowledgebase",
"dependencies": { "dependencies": {
"Admin" : "1.0.0", "Admin" : "1.0.0"
"Tasks" : "1.0.0",
"Calendar" : "1.0.0"
}, },
"providing": { "providing": {
"Navigation": "*" "Navigation": "*"