summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c11cbf)
raw | patch | inline | side by side (parent: 7c11cbf)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 14 Apr 2008 09:41:47 +0000 (09:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 14 Apr 2008 09:41:47 +0000 (09:41 +0000) |
-Removed historical class attributes (from ages before si)
-Added several comments
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10400 594d385d-05f5-0310-b6e9-bd551577e9d8
-Added several comments
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10400 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiPackage.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index 3fb126de055d6228a54852e1ddab868af58c8593..1814daf6f3275e359a797d847e7d9e6b5532a451 100644 (file)
var $FAIdebianRelease = ""; // The selected release
var $FAIdebianSection = array(); // selected section
var $FAIinstallMethod = "aptitude"; // hard coded
- var $mirror = ""; // selected mirror
- var $servers = array(); // All available servers
- var $releases = array(); // All possible releases
var $sections = array(); // All section types
var $list = NULL;
- var $mirrors = array(); // The combination of server/release/section
- var $confDir = "";
var $usedPackages = array();
var $buffer = NULL;
- var $strID ="";
var $newDialogShown =false;
var $FAIstate = "";
}
}
- if (isset($this->attrs['FAIdebianSection']['count'])){
- unset($this->attrs['FAIdebianSection']['count']);
- }
- if((isset($this->attrs['FAIdebianSection']))&&(is_array($this->attrs['FAIdebianSection']))){
- $this->FAIdebianSection = array();
- foreach($this->attrs['FAIdebianSection'] as $sec){
+ $this->FAIdebianSection = array();
+ if(isset($this->attrs['FAIdebianSection'])){
+ for($i = 0 ; $i < $this->attrs['FAIdebianSection']['count'] ; $i++ ){
+ $sec = $this->attrs['FAIdebianSection'][$i];
$this->FAIdebianSection[$sec]=$sec;
}
}
-
- if((isset($this->attrs['FAIdebianSection']))&&(is_string($this->attrs['FAIdebianSection']))){
- $this->FAIdebianSection=array($this->attrs['FAIdebianSection']=>$this->attrs['FAIdebianSection']) ;
- }
- $this->confDir = CONFIG_DIR."/fai/";
$this->FAIpackage = array();
} // ENDE dn != new
$smarty= get_smarty();
$display= "";
- $smarty->assign( "FAIinstallMethods", $this->FAIinstallMethods );
-
+ /******
+ * Initialize a new Package List with release and section name
+ ******/
+
if(!$this->is_account){
/* Assemble release name */
/* Assign Repository settings*/
$this->is_account = true;
}
+
- /* Assign variables */
- foreach($this->attributes as $attrs){
- $smarty->assign($attrs,$this->$attrs);
- }
+ /******
+ * Add && Remove Packages
+ ******/
/* + was pressed to open the package dialog */
if(isset($_POST['Addpkg']) && $this->acl_is_writeable("FAIpackage")){
}
}
+
+ /******
+ * Configure Packages
+ ******/
+
/* Configuration dialog open*/
if((isset($_POST['Conpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages'][0])) && $this->acl_is_writeable("FAIdebconfInfo")){
$pkg_config = array();
$pkg= preg_replace('/^/', '-', $pkg);
}
$this->usedPackages[$pkg]= $pkg;
-
}
}
-
/* Generate package list */
$this->list= $this->genPkgs(TRUE);
}
return $this->dialog->execute();
}
+
+ /******
+ * Display UI / HTML / smarty
+ ******/
+
+ /* Assign variables */
+ foreach($this->attributes as $attrs){
+ $smarty->assign($attrs,$this->$attrs);
+ }
+ $smarty->assign( "FAIinstallMethods", $this->FAIinstallMethods );
+
/* Assign section to smarty */
$strsec = "";
foreach($this->FAIdebianSection as $sec){
$smarty->assign($name."ACL",$this->getacl($name,preg_match("/freeze/",$this->FAIstate)));
}
- $smarty->assign("releases",$this->releases);
$smarty->assign("release" ,$this->FAIdebianRelease);
$smarty->assign("sections",$this->sections);
$smarty->assign("section" ,$strsec);
return($display);
}
- /* Delete me, and all my subtrees
+
+ /*! \brief Removes this packageList from the ldap database
*/
function remove_from_parent()
{
}
- /* Save data to object
+ /*! \brief Collect all relevant POST vars for this plugin
*/
function save_object()
{
}
- /* Check supplied data */
+ /*! \brief Check given inputs for this package list
+ @return Array Containing all error messages, or an empty array if no error occured
+ */
function check()
{
/* Call common method to give check the hook */
}
+ /*! \brief Returns all selected packages in a printable format
+ @return Array Containing all package infos.
+ */
function printUsedPackages()
{
$a_ret=array();
}
+ /*! \brief Reload the list of cached packages.
+ @return Returns the currently cached list of packages.
+ */
function genPkgs($force = false)
{
if(!count($this->buffer) || $force){
}
- /* Save to LDAP */
+ /*! \brief Save packages and their configuration to ldap
+ */
function save()
{
}
}
- /* Return plugin informations for acl handling */
+
+ /*! \brief Return plugin informations for acl handling
+ @return Array ACL infos of this plugin.
+ */
static function plInfo()
{
return (array(
}
-
-
+ /*! \brief prepares this plugin to be inserted after it was copied or cut.
+ @param Array All attributes from the source object.
+ */
function PrepareForCopyPaste($source)
{
plugin::PrepareForCopyPaste($source);
}
+ /*! \brief Returns a list of all configured servers with repositories.
+ @return Array All repository server
+ */
function getServerInfos()
{
$ret = array();