diff options
author | Sebastian Schmelzer | 2012-01-11 15:35:59 +0100 |
---|---|---|
committer | Sebastian Schmelzer | 2012-01-11 15:35:59 +0100 |
commit | 3414855d2fd3b8a754a6d6eee0d27c4b1831da18 (patch) | |
tree | 372edab4c78617919dc49308d0c8c5b3271f3cd1 /application | |
parent | remove unused stuff (diff) | |
download | pbs2-3414855d2fd3b8a754a6d6eee0d27c4b1831da18.tar.gz pbs2-3414855d2fd3b8a754a6d6eee0d27c4b1831da18.tar.xz pbs2-3414855d2fd3b8a754a6d6eee0d27c4b1831da18.zip |
fix stylecode output
Diffstat (limited to 'application')
-rw-r--r-- | application/modules/ipxe/controllers/AuthController.php | 24 | ||||
-rw-r--r-- | application/modules/user/controllers/BootisoController.php | 2 | ||||
-rw-r--r-- | application/modules/user/controllers/GroupController.php | 2 | ||||
-rw-r--r-- | application/modules/user/controllers/RoleController.php | 2 | ||||
-rw-r--r-- | application/modules/user/forms/Bootiso.php | 128 | ||||
-rw-r--r-- | application/modules/user/forms/Bootos.php | 212 | ||||
-rw-r--r-- | application/modules/user/forms/BootosUser.php | 2 | ||||
-rw-r--r-- | application/modules/user/forms/Config.php | 4 | ||||
-rw-r--r-- | application/modules/user/forms/FilterEntry.php | 6 |
9 files changed, 195 insertions, 187 deletions
diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php index cc03021..0590f4b 100644 --- a/application/modules/ipxe/controllers/AuthController.php +++ b/application/modules/ipxe/controllers/AuthController.php @@ -78,12 +78,12 @@ class Ipxe_AuthController extends Zend_Controller_Action { $result = "#!ipxe\n"; if(isset($this->session)) { - $result . = "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/".$this->error."\n"; - $result . = ":start\n"; - $result . = "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 \${filename}\n"; - $result . = "goto start\n"; + $result .= "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/".$this->error."\n"; + $result .= ":start\n"; + $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 \${filename}\n"; + $result .= "goto start\n"; } else { - $result . = "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/serialnumber/$serialnumber/mac/$mac/error/$this->error\n"; + $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/serialnumber/$serialnumber/mac/$mac/error/$this->error\n"; } header("Content-Length: ".(strlen($result))); echo $result; @@ -97,11 +97,11 @@ class Ipxe_AuthController extends Zend_Controller_Action { if (isset($login)) { header('Content-Type: text/plain'); $result = "#!ipxe\n"; - $result . = "clear username\n"; - $result . = "clear password\n"; - $result . = "login\n"; - $result . = "isset \${username} || set username null\n"; - $result . = "chain http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n"; + $result .= "clear username\n"; + $result .= "clear password\n"; + $result .= "login\n"; + $result .= "isset \${username} || set username null\n"; + $result .= "chain http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n"; header("Content-Length: ".(strlen($result))); echo $result; exit; @@ -111,7 +111,7 @@ class Ipxe_AuthController extends Zend_Controller_Action { header('WWW-Authenticate: Basic realm=""'); header('HTTP/1.0 401 Unauthorized'); $result = "#!ipxe\n"; - $result . = "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/login\n"; + $result .= "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/login\n"; header("Content-Length: ".(strlen($result))); echo $result; exit; @@ -151,7 +151,7 @@ class Ipxe_AuthController extends Zend_Controller_Action { header('Content-Type: text/plain'); $result = "#!ipxe\n"; - $result . = "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/".$this->error."\n"; + $result .= "set filename http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$this->session->getAlphasessionID()."/error/".$this->error."\n"; header("Content-Length: ".(strlen($result))); echo $result; exit; diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php index 2187dbb..da68b29 100644 --- a/application/modules/user/controllers/BootisoController.php +++ b/application/modules/user/controllers/BootisoController.php @@ -148,7 +148,7 @@ class user_BootisoController extends Zend_Controller_Action { $zip = new ZipArchive(); $res = $zip->open("../resources/bootmedium/$prebootID/preboot.zip"); - if($res == = true) { + if($res == true) { $rootdir = $zip->getNameIndex(0); $zip->addFromString($rootdir."build/rootfs/tmp/serial", $bootiso->getSerialnumber()); $zip->close(); diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php index f0a4591..bf7e1b2 100644 --- a/application/modules/user/controllers/GroupController.php +++ b/application/modules/user/controllers/GroupController.php @@ -377,7 +377,7 @@ class User_GroupController extends Zend_Controller_Action { return; } if($_SERVER['HTTP_REFERER']) { - if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show') != = false && strpos($_SERVER['HTTP_REFERER'], '/groupID/') == = false) { + if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/groupID/') == false) { $this->_helper->redirector('changemembership', 'person'); } else { $this->_redirect('/user/group/index/page/'.$this->page.'/deleteresult/ok'); diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index bbd5332..7634657 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -292,7 +292,7 @@ class User_RoleController extends Zend_Controller_Action { return; } if($_SERVER['HTTP_REFERER']) { - if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show') != = false && strpos($_SERVER['HTTP_REFERER'], '/roleID/') == = false) { + if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/roleID/') == false) { $this->_helper->redirector('changemembership', 'person'); } else { $this->_helper->redirector('', 'role'); diff --git a/application/modules/user/forms/Bootiso.php b/application/modules/user/forms/Bootiso.php index 0daa566..ba19437 100644 --- a/application/modules/user/forms/Bootiso.php +++ b/application/modules/user/forms/Bootiso.php @@ -35,30 +35,33 @@ class user_Form_Bootiso extends Zend_Form { $this->setMethod('post'); if (!Pbs_Acl::checkRight('be') && $this->action == 'editbootiso') - { $meta = true; } + { + $meta = true; + } else - { $meta = null; } + { $meta = null; + } $this->addElement('text', 'title', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'label' => 'Title:', - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Title:', + )); $this->addElement('textarea', 'description', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => false, - 'rows' => 5, - 'cols' => 50, - 'label' => 'Description:', - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'rows' => 5, + 'cols' => 50, + 'label' => 'Description:', + )); $prebootfield = $this->createElement('select', 'prebootID'); $prebootfield->setLabel('Preboot:'); @@ -74,32 +77,34 @@ class user_Form_Bootiso extends Zend_Form { $serial = time(); for($i = 2; $i < 14; $i += 3) - { $serial = substr($serial, 0, $i) .'-'. substr($serial, $i, strlen($serial)); } + { + $serial = substr($serial, 0, $i) .'-'. substr($serial, $i, strlen($serial)); + } $this->addElement('text', 'serialnumber', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'size' => 50, - 'label' => 'Serialnumber:', - 'readOnly' => $meta, - 'value' => $serial - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'size' => 50, + 'label' => 'Serialnumber:', + 'readOnly' => $meta, + 'value' => $serial + )); $date = new DateTime(); $date->add(new DateInterval('P1Y')); $this->addElement('text', 'expires', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => false, - 'label' => 'Expires:', - 'readOnly' => $meta, - 'value' => $date->format('Y-m-d'), - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'label' => 'Expires:', + 'readOnly' => $meta, + 'value' => $date->format('Y-m-d'), + )); $publicfield = $this->createElement('select', 'public'); $publicfield->setLabel('Public:'); @@ -117,22 +122,25 @@ class user_Form_Bootiso extends Zend_Form { $this->addElement($publicfield); if($this->action == "createbootiso") - { $label = "Create BootMedium"; } + { + $label = "Create BootMedium"; + } else - { $label = "Edit BootMedium"; } + { $label = "Edit BootMedium"; + } $this->addElement('submit', $this->action, array( - 'required' => false, - 'ignore' => true, - 'label' => $label, - )); + 'required' => false, + 'ignore' => true, + 'label' => $label, + )); $this->addElement('button', 'Cancel', array( - 'onclick' => 'self.location="/user/bootiso/index/page/'.$this->page.'"' - )); - ? > + 'onclick' => 'self.location="/user/bootiso/index/page/'.$this->page.'"' + )); + ?> - < script type = "text/javascript" > +<script type="text/javascript"> $(document).ready(function() { changeDepth(); $('#groups .v1').show(); @@ -141,20 +149,16 @@ class user_Form_Bootiso extends Zend_Form { i = $("#depth option:selected").val(); $('#depthimg').attr('src', '/stats/graphgroup/level/' + i); } - < / script > - - < div id = 'groups' style = 'text-align: center;' > - < div class = 'v1' > - < img alt = 'Please select a public level' id = 'depthimg' - src = '/stats/graphgroup/level/0' / > - < / div > - < / div > - - - - <? php - } + </script> +<div id='groups' style='text-align: center;'> + <div class='v1'> + <img alt='Please select a public level' id='depthimg' + src='/stats/graphgroup/level/0' /> + </div> +</div> +<?php + } } - ? > +?> diff --git a/application/modules/user/forms/Bootos.php b/application/modules/user/forms/Bootos.php index d4c9719..15cec0b 100644 --- a/application/modules/user/forms/Bootos.php +++ b/application/modules/user/forms/Bootos.php @@ -38,115 +38,121 @@ class user_Form_Bootos extends Zend_Form { $this->setEnctype("multipart/form-data"); if (!Pbs_Acl::checkRight('boe') && $this->action == 'editbootos') - { $meta = true; } + { + $meta = true; + } else - { $meta = null; } + { $meta = null; + } if($this->action == 'editbootos') - { $filereq = false; } + { + $filereq = false; + } else - { $filereq = true; } + { $filereq = true; + } $this->addElement('text', 'title', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'label' => 'Title:', - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Title:', + )); $this->addElement('textarea', 'description', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => false, - 'rows' => 5, - 'cols' => 50, - 'label' => 'Description:', - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'rows' => 5, + 'cols' => 50, + 'label' => 'Description:', + )); $this->addElement('textarea', 'defaultkcl', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 175)), - ), - 'required' => false, - 'rows' => 5, - 'cols' => 50, - 'readOnly' => $meta, - 'label' => 'Default-KCL:', - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 175)), + ), + 'required' => false, + 'rows' => 5, + 'cols' => 50, + 'readOnly' => $meta, + 'label' => 'Default-KCL:', + )); $this->addElement('text', 'distro', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 140)), - ), - 'required' => false, - 'readOnly' => $meta, - 'label' => 'Distro:', - )); + '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:', - )); + '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:', - )); + '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:', - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 140)), + ), + 'required' => false, + 'readOnly' => $meta, + 'label' => 'Share:', + )); $this->addElement('file', 'kernel', array( - 'readOnly' => $meta, - 'label' => 'Kernel:', - )); + 'readOnly' => $meta, + 'label' => 'Kernel:', + )); $this->addElement('file', 'init', array( - 'readOnly' => $meta, - 'label' => 'Initramfs:', - )); + 'readOnly' => $meta, + 'label' => 'Initramfs:', + )); $this->addElement('file', 'config', array( - 'validators' => array(array('Extension', false, array('tgz'))), - 'readOnly' => $meta, - 'label' => 'Config:', - )); + 'validators' => array(array('Extension', false, array('tgz'))), + 'readOnly' => $meta, + 'label' => 'Config:', + )); $date = new DateTime(); $date->add(new DateInterval('P1Y')); $this->addElement('text', 'expires', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => false, - 'label' => 'Expires:', - 'readOnly' => $meta, - 'value' => $date->format('Y-m-d'), - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'label' => 'Expires:', + 'readOnly' => $meta, + 'value' => $date->format('Y-m-d'), + )); $publicfield = $this->createElement('select', 'public'); $publicfield->setLabel('Public:'); @@ -164,23 +170,26 @@ class user_Form_Bootos extends Zend_Form { $this->addElement($publicfield); if($this->action == "createbootos") - { $label = "Create Bootos"; } + { + $label = "Create Bootos"; + } else - { $label = "Edit Bootos"; } + { $label = "Edit Bootos"; + } $this->addElement('submit', $this->action, array( - 'required' => false, - 'ignore' => true, - 'label' => $label, - )); + 'required' => false, + 'ignore' => true, + 'label' => $label, + )); $this->addElement('button', 'Cancel', array( - 'onclick' => 'self.location="/user/bootos/index/page/'.$this->page.'"' - )); + 'onclick' => 'self.location="/user/bootos/index/page/'.$this->page.'"' + )); - ? > + ?> - < script type = "text/javascript" > +<script type="text/javascript"> $(document).ready(function() { changeDepth(); $('#groups .v1').show(); @@ -188,18 +197,17 @@ class user_Form_Bootos extends Zend_Form { function changeDepth() { i = $("#depth option:selected").val(); $('#depthimg').attr('src', '/stats/graphgroup/level/' + i); - } < / script > - - < div id = 'groups' style = 'text-align: center;' > - < div class = 'v1' > - < img id = depthimg src = '/stats/graphgroup/' / > - < / div > - < / div > - - <? php - } + } +</script> +<div id='groups' style='text-align: center;'> + <div class='v1'> + <img id=depthimg src='/stats/graphgroup/' /> + </div> +</div> +<?php + } } - ? > +?> diff --git a/application/modules/user/forms/BootosUser.php b/application/modules/user/forms/BootosUser.php index f71a583..66555ce 100644 --- a/application/modules/user/forms/BootosUser.php +++ b/application/modules/user/forms/BootosUser.php @@ -157,5 +157,3 @@ class user_Form_BootosUser extends Zend_Form { } } -? > - diff --git a/application/modules/user/forms/Config.php b/application/modules/user/forms/Config.php index 2bc18b2..debd407 100644 --- a/application/modules/user/forms/Config.php +++ b/application/modules/user/forms/Config.php @@ -80,6 +80,4 @@ class user_Form_Config extends Zend_Form { } -} -? > - +}
\ No newline at end of file diff --git a/application/modules/user/forms/FilterEntry.php b/application/modules/user/forms/FilterEntry.php index 37f86cf..bc4efae 100644 --- a/application/modules/user/forms/FilterEntry.php +++ b/application/modules/user/forms/FilterEntry.php @@ -405,8 +405,8 @@ class user_Form_FilterEntry extends Zend_Form { } } -? > -< script type = "text/javascript" > +?> +<script type = "text/javascript"> $('#filtertype').change(function() { //alert($("#filtertype option:selected").val()); $('#filterentryform').submit(); @@ -419,4 +419,4 @@ $('#val1').focusout(function() { $('#val2').val($('#val1').val()); } }); -< / script > +</script> |