summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/models/BootOs.php60
-rw-r--r--application/models/BootOsMapper.php8
-rw-r--r--application/modules/user/controllers/BootosController.php60
-rw-r--r--application/modules/user/forms/Bootos.php77
-rw-r--r--application/modules/user/views/scripts/bootos/index.phtml43
-rw-r--r--pbs-newdata.sql23
-rw-r--r--pbs.sql10
7 files changed, 200 insertions, 81 deletions
diff --git a/application/models/BootOs.php b/application/models/BootOs.php
index bab23db..f098592 100644
--- a/application/models/BootOs.php
+++ b/application/models/BootOs.php
@@ -3,17 +3,22 @@
class Application_Model_BootOs
{
protected $_bootosID;
- protected $_configID;
protected $_groupID;
protected $_membershipID;
protected $_title;
protected $_path_init;
protected $_path_kernel;
+ protected $_path_config;
protected $_defaultkcl;
protected $_created;
protected $_description;
protected $_expires;
protected $_public;
+ protected $_source;
+ protected $_distro;
+ protected $_distroversion;
+ protected $_shortname;
+ protected $_share;
public function __construct(array $options = null)
{
@@ -62,13 +67,13 @@ class Application_Model_BootOs
$this->_bootosID = $_bootosID;
return $this;
}
- public function getConfigID()
+ public function getPath_config()
{
- return $this->_configID;
+ return $this->_path_config;
}
- public function setConfigID($_configID)
+ public function setPath_config($_path_config)
{
- $this->_configID = $_configID;
+ $this->_path_config = $_path_config;
return $this;
}
public function getGroupID()
@@ -161,6 +166,51 @@ class Application_Model_BootOs
$this->_public = $_public;
return $this;
}
+ public function getSource()
+ {
+ return $this->_source;
+ }
+ public function setSource($_source)
+ {
+ $this->_source = $_source;
+ return $this;
+ }
+ public function getDistro()
+ {
+ return $this->_distro;
+ }
+ public function setDistro($_distro)
+ {
+ $this->_distro = $_distro;
+ return $this;
+ }
+ public function getDistroversion()
+ {
+ return $this->_distroversion;
+ }
+ public function setDistroversion($_distroversion)
+ {
+ $this->_distroversion = $_distroversion;
+ return $this;
+ }
+ public function getShortname()
+ {
+ return $this->_shortname;
+ }
+ public function setShortname($_shortname)
+ {
+ $this->_shortname = $_shortname;
+ return $this;
+ }
+ public function getShare()
+ {
+ return $this->_share;
+ }
+ public function setShare($_share)
+ {
+ $this->_share = $_share;
+ return $this;
+ }
/**
* Returns current data as associative array using ReflectionClass
*
diff --git a/application/models/BootOsMapper.php b/application/models/BootOsMapper.php
index 7a4be44..0fb8754 100644
--- a/application/models/BootOsMapper.php
+++ b/application/models/BootOsMapper.php
@@ -73,7 +73,7 @@ class Application_Model_BootOsMapper
public function save(Application_Model_BootOs $botos)
{
- $data = array('bootosID'=> $botos->getID() ,'configID'=> $botos->getConfigID() ,'groupID'=> $botos->getGroupID() ,'title'=> $botos->getTitle(), 'membershipID'=> $botos->getMembershipID() ,'path_init'=> $botos->getPath_init() ,'path_kernel'=> $botos->getPath_kernel() ,'defaultkcl'=> $botos->getDefaultkcl() ,'created'=> $botos->getCreated() ,'description'=> $botos->getDescription() ,'expires'=> $botos->getExpires() ,'public'=> $botos->getPublic() );
+ $data = array('bootosID'=> $botos->getID() ,'path_config'=> $botos->getPath_config() ,'groupID'=> $botos->getGroupID() ,'title'=> $botos->getTitle(), 'membershipID'=> $botos->getMembershipID() ,'path_init'=> $botos->getPath_init() ,'path_kernel'=> $botos->getPath_kernel() ,'defaultkcl'=> $botos->getDefaultkcl() ,'created'=> $botos->getCreated() ,'description'=> $botos->getDescription() ,'expires'=> $botos->getExpires() ,'public'=> $botos->getPublic(),'source'=> $botos->getSource(),'distro'=> $botos->getDistro(),'distroversion'=> $botos->getDistroversion(),'shortname'=> $botos->getShortname(),'share'=> $botos->getShare() );
if (null === ($id = $botos->getID()) ) {
unset($data['bootosID']);
return $this->getDbTable()->insert($data);
@@ -102,10 +102,10 @@ class Application_Model_BootOsMapper
if($botos == null){
$botos = new Application_Model_BootOs();
- $botos->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public);
+ $botos->setID($row->bootosID)->setPath_config($row->path_config)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public)->setSource($row->source)->setDistro($row->distro)->setDistroversion($row->distroversion)->setShortname($row->shortname)->setShare($row->share);
return $botos;
}else{
- $botos->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public);
+ $botos->setID($row->bootosID)->setPath_config($row->path_config)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public)->setSource($row->source)->setDistro($row->distro)->setDistroversion($row->distroversion)->setShortname($row->shortname)->setShare($row->share);
}
}
@@ -117,7 +117,7 @@ class Application_Model_BootOsMapper
foreach ($resultSet as $row) {
$entry = new Application_Model_BootOs();
- $entry->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public);
+ $entry->setID($row->bootosID)->setPath_config($row->path_config)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public)->setSource($row->source)->setDistro($row->distro)->setDistroversion($row->distroversion)->setShortname($row->shortname)->setShare($row->share);
$entries[$row->bootosID] = $entry;
}
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php
index 2fe8f41..4a173ae 100644
--- a/application/modules/user/controllers/BootosController.php
+++ b/application/modules/user/controllers/BootosController.php
@@ -70,6 +70,8 @@ class user_BootosController extends Zend_Controller_Action
foreach ($bootos as $b)
if($b->getPublic() - $k >= 0 )
$this->view->bootoslist[] = $b;
+ elseif($k == 0 && $b->getPublic() == -1 && Pbs_Acl::checkRight('boc'))
+ $this->view->bootoslist[] = $b;
}
}
@@ -77,9 +79,7 @@ class user_BootosController extends Zend_Controller_Action
$this->view->update = array();
$update = $this->_request->getParam('checkupdate');
- $groupMapper = new Application_Model_GroupMapper();
- $configMapper = new Application_Model_ConfigMapper();
-
+ $groupMapper = new Application_Model_GroupMapper();
if(count($this->view->bootoslist)>0){
foreach ($this->view->bootoslist as $bootos){
@@ -87,7 +87,6 @@ class user_BootosController extends Zend_Controller_Action
if($bootos->getDefaultkcl() == null)
$bootos->setDefaultkcl("none (edit Bootos to set KCL)");
$bootos->setGroupID("[".$bootos->getGroupID()."] ".$groupMapper->find($bootos->getGroupID())->getTitle());
- $bootos->setConfigID("[".$bootos->getConfigID()."] ".$configMapper->find($bootos->getConfigID())->getTitle());
$bootos->setCreated(date(Zend_Registry::get('dateformat'),$bootos->getCreated()));
$bootos->setExpires(date(Zend_Registry::get('dateformat'),$bootos->getExpires()));
}
@@ -133,21 +132,16 @@ class user_BootosController extends Zend_Controller_Action
$groupgroupsMapper = new Application_Model_GroupGroupsMapper();
$childgroups = count($groupgroupsMapper->getChildGroups($groupID));
- $configMapper = new Application_Model_ConfigMapper();
- $configlist = $configMapper->findBy(array("groupID" => $groupID));
-
if (!isset($_POST["createbootos"])){
$bootosForm = new user_Form_Bootos(array(
'action' => 'createbootos',
'groupdepth' => $childgroups,
- 'configlist'=>$configlist,
'page' => $this->page));
} else {
$bootosForm = new user_Form_Bootos(array(
'action' => 'createbootos',
'groupdepth' => $childgroups,
- 'configlist'=>$configlist,
'page' => $this->page),$_POST);
if ($bootosForm->isValid($_POST)) {
@@ -165,8 +159,9 @@ class user_BootosController extends Zend_Controller_Action
$hash = md5(microtime(1));
exec("wget -O '".$path_tmp."kernel".$hash."' ".escapeshellcmd($bootos->getPath_kernel())." 2>&1 | grep 'saved'", $status);
exec("wget -O '".$path_tmp."initramfs".$hash."' ".escapeshellcmd($bootos->getPath_init())." 2>&1 | grep 'saved'", $status2);
-
- if(!array_pop($status) || !array_pop($status2)){
+ exec("wget -O '".$path_tmp."config".$hash."' ".escapeshellcmd($bootos->getPath_config())." 2>&1 | grep 'saved'", $status3);
+
+ if(!array_pop($status) || !array_pop($status2) || !array_pop($status3)){
$this->view->bootosForm = $bootosForm;
$pbsNotifier = new Pbs_Notifier();
echo $pbsNotifier->notify('The Resource was not found on the specified path','error');
@@ -178,12 +173,15 @@ class user_BootosController extends Zend_Controller_Action
$initpath = "../resources/bootos/".$bootosID."/initramfs/";
$kernelpath = "../resources/bootos/".$bootosID."/kernel/";
+ $configpath = "../resources/bootos/".$bootosID."/config/";
mkdir($initpath ,0777, true);
mkdir($kernelpath ,0777, true);
+ mkdir($configpath ,0777, true);
exec("mv ../resources/bootos/kernel$hash $kernelpath"."kernel");
exec("mv ../resources/bootos/initramfs$hash $initpath"."initramfs");
+ exec("mv ../resources/bootos/config$hash $configpath"."config.tgz");
}catch(Zend_Exception $e)
{
@@ -210,9 +208,10 @@ class user_BootosController extends Zend_Controller_Action
$bootosID = $bootos->getID();
- if(is_file("../resources/bootos/$bootosID/kernel/kernel") && is_file("../resources/bootos/$bootosID/initramfs/initramfs")){
+ if(is_file("../resources/bootos/$bootosID/kernel/kernel") && is_file("../resources/bootos/$bootosID/initramfs/initramfs") && is_file("../resources/bootos/$bootosID/config/config.tgz")){
$kernelolddate = filemtime("../resources/bootos/".$bootosID."/kernel/kernel");
$initolddate = filemtime("../resources/bootos/".$bootosID."/initramfs/initramfs");
+ $configolddate = filemtime("../resources/bootos/".$bootosID."/config/config.tgz");
}
else
{
@@ -223,13 +222,15 @@ class user_BootosController extends Zend_Controller_Action
exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_kernel())."' 2>&1 | grep 'Last-Modified:'", $kerneldate);
exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_init())."' 2>&1 | grep 'Last-Modified:'", $initdate);
+ exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_config())."' 2>&1 | grep 'Last-Modified:'", $configdate);
$kerneldate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($kerneldate))));
$initdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($initdate))));
+ $configdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($configdate))));
//print_a($bootos->getPath_kernel(),$kerneldate,$kernelolddate,$initname,$initdate,$initolddate);
- if($kerneldate > $kernelolddate || $initdate > $initolddate){
+ if($kerneldate > $kernelolddate || $initdate > $initolddate || $configdate > $configolddate){
$this->view->notification = $pbsNotifier->notify('There are updates available','ok');
return true;
}else{
@@ -256,19 +257,22 @@ class user_BootosController extends Zend_Controller_Action
$initpath = "../resources/bootos/".$bootosID."/initramfs/";
$kernelpath = "../resources/bootos/".$bootosID."/kernel/";
+ $configpath = "../resources/bootos/".$bootosID."/config/";
$path_tmp = "../resources/bootos/";
$hash = md5(microtime(1));
exec("wget -O '".$path_tmp."kernel".$hash."' ".escapeshellcmd($bootos->getPath_kernel())." 2>&1 | grep 'saved'", $status);
exec("wget -O '".$path_tmp."initramfs".$hash."' ".escapeshellcmd($bootos->getPath_init())." 2>&1 | grep 'saved'", $status2);
-
- if(!array_pop($status) || !array_pop($status2)){
+ exec("wget -O '".$path_tmp."config".$hash."' ".escapeshellcmd($bootos->getPath_config())." 2>&1 | grep 'saved'", $status3);
+
+ if(!array_pop($status) || !array_pop($status2) || !array_pop($status3)){
$this->_redirect('/user/bootos/index/page/'.$this->page.'/updateresult/404');
//TODO Delete Files in tmp
}
exec("mv ../resources/bootos/kernel$hash $kernelpath"."kernel");
exec("mv ../resources/bootos/initramfs$hash $initpath"."initramfs");
+ exec("mv ../resources/bootos/config$hash $initpath"."config.tgz");
$this->_redirect('/user/bootos/index/page/'.$this->page.'/updateresult/ok');
}
@@ -288,9 +292,6 @@ class user_BootosController extends Zend_Controller_Action
$groupgroupsMapper = new Application_Model_GroupGroupsMapper();
$childgroups = count($groupgroupsMapper->getChildGroups($groupID));
-
- $configMapper = new Application_Model_ConfigMapper();
- $configlist = $configMapper->findBy(array("groupID" => $groupID));
$bootos = new Application_Model_BootOs();
$bootos = $this->bootosMapper->find($bootosID);
@@ -303,7 +304,6 @@ class user_BootosController extends Zend_Controller_Action
$bootosForm = new user_Form_Bootos(array(
'action' => 'editbootos',
'groupdepth' => $childgroups,
- 'configlist'=>$configlist,
'page' => $this->page));
$bootosForm->populate($bootos->toArray());
@@ -312,7 +312,6 @@ class user_BootosController extends Zend_Controller_Action
$bootosForm = new user_Form_Bootos(array(
'action' => 'editbootos',
'groupdepth' => $childgroups,
- 'configlist'=>$configlist,
'page' => $this->page),$_POST);
if ($bootosForm->isValid($_POST)) {
@@ -322,11 +321,13 @@ class user_BootosController extends Zend_Controller_Action
$bootos = new Application_Model_BootOs($_POST);
$bootos->setGroupID($this->membership->getGroupID());
$bootos->setCreated(time());
- if($bootos->getConfigID() == '')
- $bootos->setConfigID(NULL);
$bootos->setID($bootosID);
- if( $bootos->getConfigID() != $bootosold->getConfigID() ||
+ if( $bootos->getSource() != $bootosold->getSource() ||
+ $bootos->getDistro() != $bootosold->getDistro() ||
+ $bootos->getDistroversion() != $bootosold->getDistroversion() ||
+ $bootos->getShare() != $bootosold->getShare() ||
+ $bootos->getShortname() != $bootosold->getShortname() ||
$bootos->getDefaultkcl() != $bootosold->getDefaultkcl() ||
$bootos->getExpires() != $bootosold->getExpires() ||
$bootos->getPublic() != $bootosold->getPublic() ){
@@ -335,7 +336,7 @@ class user_BootosController extends Zend_Controller_Action
$this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden');
}
- if($bootos->getPath_kernel() != $bootosold->getPath_kernel() || $bootos->getPath_init() != $bootosold->getPath_init()){
+ if($bootos->getPath_config() != $bootosold->getPath_config() || $bootos->getPath_kernel() != $bootosold->getPath_kernel() || $bootos->getPath_init() != $bootosold->getPath_init()){
//ACL Is he allowed to edit the Kernel/Init Path?
if(!Pbs_Acl::checkRight('boe'))
$this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden');
@@ -345,8 +346,9 @@ class user_BootosController extends Zend_Controller_Action
$hash = md5(microtime(1));
exec("wget -O '".$path_tmp."kernel".$hash."' ".escapeshellcmd($bootos->getPath_kernel())." 2>&1 | grep 'saved'", $status);
exec("wget -O '".$path_tmp."initramfs".$hash."' ".escapeshellcmd($bootos->getPath_init())." 2>&1 | grep 'saved'", $status2);
+ exec("wget -O '".$path_tmp."config".$hash."' ".escapeshellcmd($bootos->getPath_config())." 2>&1 | grep 'saved'", $status3);
- if(!array_pop($status) || !array_pop($status2)){
+ if(!array_pop($status) || !array_pop($status2) || !array_pop($status3)){
$this->view->bootosForm = $bootosForm;
$pbsNotifier = new Pbs_Notifier();
echo $pbsNotifier->notify('The Resource was not found on the specified path','error');
@@ -356,13 +358,15 @@ class user_BootosController extends Zend_Controller_Action
$initpath = "../resources/bootos/".$bootosID."/initramfs/";
$kernelpath = "../resources/bootos/".$bootosID."/kernel/";
-
+ $configpath = "../resources/bootos/".$bootosID."/config/";
+
mkdir($initpath ,0777, true);
mkdir($kernelpath ,0777, true);
-
+ mkdir($configpath ,0777, true);
+
exec("mv ../resources/bootos/kernel$hash $kernelpath"."kernel");
exec("mv ../resources/bootos/initramfs$hash $initpath"."initramfs");
-
+ exec("mv ../resources/bootos/config$hash $initpath"."config.tgz");
}
try {
diff --git a/application/modules/user/forms/Bootos.php b/application/modules/user/forms/Bootos.php
index c9669c7..964fbf3 100644
--- a/application/modules/user/forms/Bootos.php
+++ b/application/modules/user/forms/Bootos.php
@@ -52,19 +52,6 @@ class user_Form_Bootos extends Zend_Form
'cols' => 50,
'label' => 'Description:',
));
-
- $configfield = $this->createElement('select','configID');
- $configfield ->setLabel('Config:');
- $configfield->setAttrib('readOnly', $meta);
-
- if(count($this->configlist)>0){
- foreach($this->configlist as $config => $c){
- $configfield->addMultiOption($c->getID(), $c->getTitle());
- }
- }
-
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
$this->addElement('text', 'path_init', array(
'filters' => array('StringTrim'),
@@ -88,6 +75,17 @@ class user_Form_Bootos extends Zend_Form
'label' => 'Kernel-Path:',
));
+ $this->addElement('text', 'path_config', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 250)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'readOnly' => $meta,
+ 'label' => 'Config-Path:',
+ ));
+
$this->addElement('textarea', 'defaultkcl', array(
'filters' => array('StringTrim'),
'validators' => array(
@@ -100,6 +98,56 @@ class user_Form_Bootos extends Zend_Form
'label' => 'Default-KCL:',
));
+ $this->addElement('text', 'source', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'readOnly' => $meta,
+ 'label' => 'Source:',
+ ));
+
+ $this->addElement('text', 'distro', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'readOnly' => $meta,
+ 'label' => 'Distro:',
+ ));
+
+ $this->addElement('text', 'distroversion', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'readOnly' => $meta,
+ 'label' => 'Distroversion:',
+ ));
+
+ $this->addElement('text', 'shortname', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'readOnly' => $meta,
+ 'label' => 'Shortname:',
+ ));
+
+ $this->addElement('text', 'share', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'readOnly' => $meta,
+ 'label' => 'Share:',
+ ));
+
$date = new DateTime();
$date->add(new DateInterval('P1Y'));
$this->addElement('text', 'expires', array(
@@ -115,7 +163,8 @@ class user_Form_Bootos extends Zend_Form
$publicfield = $this->createElement('select','public');
$publicfield->setLabel('Public:');
- $publicfield->addMultiOption(0, '0. Eigene Gruppe');
+ $publicfield->addMultiOption(-1, 'X. Not Visible');
+ $publicfield->addMultiOption(0, '0. Own Group');
$publicfield->setAttrib('readOnly', $meta);
$publicfield->setAttrib('id', 'depth');
$publicfield->setAttrib('onchange', "$('#groups .v1').show();changeDepth();");
diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml
index c2ce559..f76338b 100644
--- a/application/modules/user/views/scripts/bootos/index.phtml
+++ b/application/modules/user/views/scripts/bootos/index.phtml
@@ -18,14 +18,19 @@
<?php if(Pbs_Acl::checkRight('boai')): ?>
<div class='code'>bootosID</div>
<div class='code'>public</div>
- <div class='code'>kernel</div>
+ <div class='code'>path_kernel</div>
<div class='code'>kcl</div>
- <div class='code'>init</div>
+ <div class='code'>path_init</div>
+ <div class='code'>path_config</div>
+ <div class='code'>distro</div>
+ <div class='code'>distroversion</div>
+ <div class='code'>share</div>
+ <div class='code'>shortname</div>
+ <div class='code'>source</div>
<?php endif; ?>
<div class='code'>title</div>
<div class='code'>groupID</div>
- <div class='code'>configID</div>
<div class='code'>description</div>
<div class='code'>created</div>
<div class='code'>expires</div>
@@ -35,6 +40,7 @@
<?php if(count($this->bootoslist)==0)
echo "There are no BootOs's to display." ?>
<?php foreach ($this->bootoslist as $k => $bootos): ?>
+ <?php if($bootos->getPublic() != -1 || Pbs_Acl::checkRight('boai'))?>
<div class='element'>
<div class='number'>
<div class='smallnumber'>BootOs</div>
@@ -84,7 +90,6 @@
<?php endif; ?>
</div>
<?php if(!Pbs_Acl::checkRight('boai')){
- $bootos->setConfigID(preg_replace("!^\[[0-9]+\]\s!",'',$bootos->getConfigID()));
$bootos->setGroupID(preg_replace("!^\[[0-9]+\]\s!",'',$bootos->getGroupID()));
} ?>
<div class='title'><?php echo $this->escape($bootos->getTitle()); ?></div>
@@ -92,25 +97,33 @@
<div class='details dispnone'>
<?php if(Pbs_Acl::checkRight('boai')): ?>
<label>BootosID</label>
- <div class='item'><?php echo $this->escape($bootos->getID()); ?></div>
- <?php endif; ?>
- <label>ConfigID</label>
- <div class='item'><?php echo $this->escape($bootos->getConfigID()); ?></div>
- <?php if(Pbs_Acl::checkRight('boai')): ?>
+ <div class='item'><?php echo $this->escape($bootos->getID()); ?>&nbsp;</div>
<label>initPath</label>
- <div class='item'><?php echo $this->escape($bootos->getPath_init()); ?></div>
+ <div class='item'><?php echo $this->escape($bootos->getPath_init()); ?>&nbsp;</div>
<label>kernelPath</label>
- <div class='item'><?php echo $this->escape($bootos->getPath_kernel()); ?></div>
+ <div class='item'><?php echo $this->escape($bootos->getPath_kernel()); ?>&nbsp;</div>
+ <label>configPath</label>
+ <div class='item'><?php echo $this->escape($bootos->getPath_config()); ?>&nbsp;</div>
<label>Default KCL</label>
- <div class='item'><?php echo $this->escape($bootos->getDefaultkcl()); ?></div>
+ <div class='item'><?php echo $this->escape($bootos->getDefaultkcl()); ?>&nbsp;</div>
+ <label>Source</label>
+ <div class='item'><?php echo $this->escape($bootos->getSource()); ?>&nbsp;</div>
+ <label>Distro</label>
+ <div class='item'><?php echo $this->escape($bootos->getDistro()); ?>&nbsp;</div>
+ <label>Distroversion</label>
+ <div class='item'><?php echo $this->escape($bootos->getDistroversion()); ?>&nbsp;</div>
+ <label>Shortname</label>
+ <div class='item'><?php echo $this->escape($bootos->getShortname()); ?>&nbsp;</div>
+ <label>Share</label>
+ <div class='item'><?php echo $this->escape($bootos->getShare()); ?>&nbsp;</div>
<?php endif; ?>
<label>Changed</label>
- <div class='item'><?php echo $this->escape($bootos->getCreated()); ?></div>
+ <div class='item'><?php echo $this->escape($bootos->getCreated()); ?>&nbsp;</div>
<label>Expires</label>
- <div class='item'><?php echo $this->escape($bootos->getExpires()); ?></div>
+ <div class='item'><?php echo $this->escape($bootos->getExpires()); ?>&nbsp;</div>
<?php if(Pbs_Acl::checkRight('boai')): ?>
<label>Public</label>
- <div class='item'><?php echo $this->escape($bootos->getPublic()); ?></div>
+ <div class='item'><?php echo $this->escape($bootos->getPublic()); ?>&nbsp;</div>
<?php endif; ?>
</div>
diff --git a/pbs-newdata.sql b/pbs-newdata.sql
index 7130f88..094609b 100644
--- a/pbs-newdata.sql
+++ b/pbs-newdata.sql
@@ -77,17 +77,18 @@ INSERT INTO `pbs_config` (`configID`, `title`, `groupID`, `membershipID`, `shell
(5, 'Config 5', null, 1, 'shellskript 5', '1299693690');
-- Adding bootos
-INSERT INTO `pbs_bootos` (`bootosID`, `configID`, `groupID`, `membershipID`, `title`, `description`, `path_init`, `path_kernel`, `defaultkcl`, `created`, `expires`, `public`) VALUES
-(1, 1, 1, 1, 'BootOs 1', 'Description 1', 'initpath 1', 'kernelpath 1', 'default kcl 1', '1299693782', '2012-03-09', 0),
-(2, 1, 1, 1, 'BootOs 2', 'Description 2', 'initpath 2', 'kernelpath 2', 'default kcl 2', '1299693782', '2012-03-09', 0),
-(3, 1, 1, 1, 'BootOs 3', 'Description 3', 'initpath 3', 'kernelpath 3', 'default kcl 3', '1299693782', '2012-03-09', 0),
-(4, 1, 1, 1, 'BootOs 4', 'Description 4', 'initpath 4', 'kernelpath 4', 'default kcl 4', '1299693782', '2012-03-09', 0),
-(5, 1, 1, 1, 'BootOs 5', 'Description 5', 'initpath 5', 'kernelpath 5', 'default kcl 5', '1299693782', '2012-03-09', 0),
-(6, 1, 1, 1, 'BootOs 6', 'Description 6', 'initpath 6', 'kernelpath 6', 'default kcl 6', '1299693782', '2012-03-09', 0),
-(7, 1, 1, 1, 'BootOs 7', 'Description 7', 'initpath 7', 'kernelpath 7', 'default kcl 7', '1299693782', '2012-03-09', 0),
-(8, 1, 1, 1, 'BootOs 8', 'Description 8', 'initpath 8', 'kernelpath 8', 'default kcl 8', '1299693782', '2012-03-09', 0),
-(9, 1, 1, 1, 'BootOs 9', 'Description 9', 'initpath 9', 'kernelpath 9', 'default kcl 9', '1299693782', '2012-03-09', 0),
-(10, 1, 1, 1, 'BootOs 10', 'Description 10', 'initpath 10', 'kernelpath 10', 'default kcl 10', '1299693782', '2012-03-09', 0);
+INSERT INTO `pbs_bootos` (`bootosID`, `path_config`, `groupID`, `membershipID`, `title`, `description`, `path_init`, `path_kernel`, `defaultkcl`, `created`, `expires`, `public`, `source`, `distro`, `distroversion`, `shortname`, `share`) VALUES
+(1, 'configpath 1', 1, 1, 'BootOs 1', 'Description 1', 'initpath 1', 'kernelpath 1', 'default kcl 1', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(2, 'configpath 2', 1, 1, 'BootOs 2', 'Description 2', 'initpath 2', 'kernelpath 2', 'default kcl 2', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(3, 'configpath 3', 1, 1, 'BootOs 3', 'Description 3', 'initpath 3', 'kernelpath 3', 'default kcl 3', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(4, 'configpath 4', 1, 1, 'BootOs 4', 'Description 4', 'initpath 4', 'kernelpath 4', 'default kcl 4', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(5, 'configpath 5', 1, 1, 'BootOs 5', 'Description 5', 'initpath 5', 'kernelpath 5', 'default kcl 5', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(6, 'configpath 6', 1, 1, 'BootOs 6', 'Description 6', 'initpath 6', 'kernelpath 6', 'default kcl 6', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(7, 'configpath 7', 1, 1, 'BootOs 7', 'Description 7', 'initpath 7', 'kernelpath 7', 'default kcl 7', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(8, 'configpath 8', 1, 1, 'BootOs 8', 'Description 8', 'initpath 8', 'kernelpath 8', 'default kcl 8', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(9, 'configpath 9', 1, 1, 'BootOs 9', 'Description 9', 'initpath 9', 'kernelpath 9', 'default kcl 9', '1299693782', '2012-03-09', 0, null, null, null, null, null),
+(10, 'configpath 10', 1, 1, 'BootOs 10', 'Description 10', 'initpath 10', 'kernelpath 10', 'default kcl 10', '1299693782', '2012-03-09', 0, null, null, null, null, null);
+
-- Adding preboot
INSERT INTO `pbs_preboot` (`prebootID`, `title`, `membershipID`, `groupID`, `path_preboot`) VALUES
diff --git a/pbs.sql b/pbs.sql
index db02a1e..80c368b 100644
--- a/pbs.sql
+++ b/pbs.sql
@@ -135,25 +135,27 @@ ALTER TABLE `pbs_config`
CREATE TABLE IF NOT EXISTS `pbs_bootos` (
`bootosID` int(11) NOT NULL AUTO_INCREMENT,
- `configID` int(11),
`groupID` int(11) NOT NULL,
`membershipID` int(11),
`title` varchar(30) NOT NULL,
`description` varchar(140),
+ `distro` varchar(30),
+ `distroversion` varchar(30),
+ `source` varchar(140),
+ `share` varchar(30),
+ `shortname` varchar(30),
`path_init` varchar(140) NOT NULL,
`path_kernel` varchar(140) NOT NULL,
+ `path_config` varchar(140),
`defaultkcl` varchar(255),
`created` VARCHAR(14) NOT NULL,
`expires` VARCHAR(14),
`public` int(11) NOT NULL,
PRIMARY KEY (`bootosID`),
- KEY `configID` (`configID`),
KEY `groupID` (`groupID`),
KEY `membershipID` (`membershipID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-
ALTER TABLE `pbs_bootos`
- ADD CONSTRAINT `pbs_bootos_ibfk_1` FOREIGN KEY (`configID`) REFERENCES `pbs_config` (`configID`) ON DELETE SET NULL,
ADD CONSTRAINT `pbs_bootos_ibfk_2` FOREIGN KEY (`groupID`) REFERENCES `pbs_group` (`groupID`) ON DELETE CASCADE,
ADD CONSTRAINT `pbs_bootos_ibfk_3` FOREIGN KEY (`membershipID`) REFERENCES `pbs_membership` (`membershipID`) ON DELETE SET NULL;