|
@@ -2,10 +2,12 @@
|
|
|
class Label {
|
|
class Label {
|
|
|
private $id = NULL;
|
|
private $id = NULL;
|
|
|
private $name = '';
|
|
private $name = '';
|
|
|
|
|
+ private $path = '';
|
|
|
|
|
|
|
|
- public function __construct($id, $name) {
|
|
|
|
|
|
|
+ public function __construct($id, $name, $path) {
|
|
|
$this->id = $id;
|
|
$this->id = $id;
|
|
|
$this->name = $name;
|
|
$this->name = $name;
|
|
|
|
|
+ $this->path = $path;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function getId() {
|
|
public function getId() {
|
|
@@ -16,6 +18,10 @@ class Label {
|
|
|
return $this->name;
|
|
return $this->name;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public function getPath() {
|
|
|
|
|
+ return $this->path;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Get all Labels
|
|
* Get all Labels
|
|
|
*
|
|
*
|
|
@@ -31,7 +37,7 @@ class Label {
|
|
|
$labels = $db->selectQuery("SELECT * FROM `labels`;");
|
|
$labels = $db->selectQuery("SELECT * FROM `labels`;");
|
|
|
|
|
|
|
|
foreach($labels as $label) {
|
|
foreach($labels as $label) {
|
|
|
- $return[] = new Label($label->id, $label->name);
|
|
|
|
|
|
|
+ $return[] = new Label($label->id, $label->name, $label->path);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $return;
|
|
return $return;
|
|
@@ -54,7 +60,7 @@ class Label {
|
|
|
$labels = $db->selectQuery("SELECT * FROM `labels` WHERE `id` = " . $labelId . ";");
|
|
$labels = $db->selectQuery("SELECT * FROM `labels` WHERE `id` = " . $labelId . ";");
|
|
|
|
|
|
|
|
foreach($labels as $label) {
|
|
foreach($labels as $label) {
|
|
|
- $return[] = new Label($label->id, $label->name);
|
|
|
|
|
|
|
+ $return[] = new Label($label->id, $label->name, $label->path);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(sizeof($return) > 1) {
|
|
if(sizeof($return) > 1) {
|
|
@@ -81,7 +87,7 @@ class Label {
|
|
|
$labels = $db->selectQuery("SELECT * FROM `labels` WHERE `path` = '" . $path . "';");
|
|
$labels = $db->selectQuery("SELECT * FROM `labels` WHERE `path` = '" . $path . "';");
|
|
|
|
|
|
|
|
foreach($labels as $label) {
|
|
foreach($labels as $label) {
|
|
|
- $return[] = new Label($label->id, $label->name);
|
|
|
|
|
|
|
+ $return[] = new Label($label->id, $label->name, $label->path);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(sizeof($return) > 1) {
|
|
if(sizeof($return) > 1) {
|