<XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
</XMI.header>
<XMI.content>
- <docsettings viewid="412" documentation="" uniqueid="527" />
+ <docsettings viewid="412" documentation="" uniqueid="528" />
<umlobjects>
<UML:Class stereotype="" package="AI" xmi.id="413" abstract="0" documentation="Servicio." name="AI_Servicio" static="0" scope="200" >
<UML:Operation stereotype="" package="" xmi.id="465" type="void" abstract="0" documentation="" name="AI_Servicio" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="DB" abstract="0" documentation="DB donde guardar." name="db" static="0" scope="200" />
<UML:Parameter stereotype="" package="" xmi.id="2" value="false" type="bool" abstract="0" documentation="Si es true, se fuerza a guardar el servicio como nuevo." name="nuevo" static="0" scope="200" />
</UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="528" type="array" abstract="0" documentation="Obtiene un array con los identificadores de los sistemas cargados." name="getSistemasArray" static="1" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="DB" abstract="0" documentation="Base de datos de la cual obtener los sistemas." name="db" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="2" value="''" type="string" abstract="0" documentation="Clausula WHERE para filtrar resultados." name="where" static="0" scope="200" />
+ </UML:Operation>
<UML:Attribute stereotype="" package="" xmi.id="437" value="0" type="int" abstract="0" documentation="ID del sistema (ID en SAMURAI).
FIXME - preguntar a gonzalo si le sirve." name="sistema" static="0" scope="200" />
<UML:Attribute stereotype="" package="" xmi.id="513" value="''" type="string" abstract="0" documentation="Nombre del sistema (sólo de lectura, extraído de SAMURAI).
<diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="412" documentation="" type="402" showops="1" showpackage="0" name="Clases" localid="30000" showstereotype="0" showscope="1" font="Helvetica,8,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
<widgets>
<UML:ConceptWidget usesdiagramfillcolour="0" width="170" showattsigs="601" usesdiagramusefillcolour="0" x="278" linecolour="#ff0000" y="324" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="168" usefillcolor="1" showattributes="1" xmi.id="413" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="277" showattsigs="601" usesdiagramusefillcolour="0" x="27" linecolour="#ff0000" y="171" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="140" usefillcolor="1" showattributes="1" xmi.id="416" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="287" showattsigs="601" usesdiagramusefillcolour="0" x="31" linecolour="#ff0000" y="165" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="154" usefillcolor="1" showattributes="1" xmi.id="416" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="262" showattsigs="601" usesdiagramusefillcolour="0" x="421" linecolour="#ff0000" y="557" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="35" usefillcolor="1" showattributes="1" xmi.id="469" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="73" showattsigs="601" usesdiagramusefillcolour="0" x="516" linecolour="#ff0000" y="501" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="24" usefillcolor="1" showattributes="0" xmi.id="471" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="277" showattsigs="601" usesdiagramusefillcolour="0" x="461" linecolour="#ff0000" y="310" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="182" usefillcolor="1" showattributes="1" xmi.id="486" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="271" showattsigs="601" usesdiagramusefillcolour="0" x="27" linecolour="#ff0000" y="543" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="49" usefillcolor="1" showattributes="1" xmi.id="507" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="146" showattsigs="601" usesdiagramusefillcolour="0" x="89" linecolour="#ff0000" y="468" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="24" usefillcolor="1" showattributes="0" xmi.id="508" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="346" showattsigs="601" usesdiagramusefillcolour="0" x="157" linecolour="#ff0000" y="31" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="98" usefillcolor="1" showattributes="1" xmi.id="516" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="297" showattsigs="601" usesdiagramusefillcolour="0" x="327" linecolour="#ff0000" y="171" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="56" usefillcolor="1" showattributes="1" xmi.id="524" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="297" showattsigs="601" usesdiagramusefillcolour="0" x="326" linecolour="#ff0000" y="165" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="56" usefillcolor="1" showattributes="1" xmi.id="524" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
</widgets>
<messages/>
<associations>
</UML:AssocWidget>
<UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="516" widgetaid="416" documentation="" type="500" >
<linepath>
- <startpoint startx="165" starty="171" />
+ <startpoint startx="174" starty="165" />
<endpoint endx="272" endy="129" />
</linepath>
</UML:AssocWidget>
<UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="516" widgetaid="524" documentation="" type="500" >
<linepath>
- <startpoint startx="475" starty="171" />
+ <startpoint startx="474" starty="165" />
<endpoint endx="387" endy="129" />
</linepath>
</UML:AssocWidget>
<UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="524" widgetaid="486" documentation="" type="500" >
<linepath>
<startpoint startx="599" starty="310" />
- <endpoint endx="525" endy="227" />
+ <endpoint endx="524" endy="221" />
</linepath>
</UML:AssocWidget>
<UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="524" widgetaid="413" documentation="" type="500" >
<linepath>
<startpoint startx="363" starty="324" />
- <endpoint endx="426" endy="227" />
+ <endpoint endx="425" endy="221" />
</linepath>
</UML:AssocWidget>
</associations>
<listitem open="0" type="813" id="416" label="AI_Sistema" >
<listitem open="0" type="815" id="466" label="AI_Sistema" />
<listitem open="0" type="814" id="514" label="descripcion" />
+ <listitem open="0" type="815" id="528" label="getSistemasArray" />
<listitem open="0" type="815" id="459" label="guardar" />
<listitem open="0" type="814" id="445" label="habilitado" />
<listitem open="0" type="814" id="438" label="icono" />
*/
function iniciar(&$obj, $accion = AI_ALTA) // ~X2C
{
+ # FIXME - Tomar la db desde afuera.
+ $db = AI_DB::connect('../conf/DB.ini');
$tipo = substr(get_class($obj), 3);
$s_tipo = ucfirst($tipo);
if ($tipo == 'gruposecciones') {
// Elementos.
if ($tipo == 'sistema') {
require_once 'SAMURAI/Sistema.php';
- $sistemas = array('' => '--') +
- SAMURAI_Sistema::getArraySistemas(AI_DB::connect('../conf/DB.ini'));
- $fId =& $this->addElement('select', $tipo, 'Sistema', $sistemas);
+ $sistemas = array('' => '--');
+ $cargados = AI_Sistema::getSistemasArray($db);
+ foreach (SAMURAI_Sistema::getArraySistemas($db) as $id => $nom) {
+ if (!in_array($id, $cargados)
+ or ($accion & (AI_BAJA | AI_MODIF) and $id == $obj->$tipo)) {
+ $sistemas[$id] = $nom;
+ }
+ }
+ $fId =& $this->addElement('select', $tipo, 'Sistema', $sistemas);
$this->addRule($tipo, 'Debe ingresar un sistema.', 'required');
}
if ($accion & (AI_BAJA | AI_MODIF)) {
}
if ($tipo == 'grupo' or $tipo == 'servicio') {
$tipos = array('' => '--', '0' => 'Página Principal')
- + arbol2array(AI_DB::connect('../conf/DB.ini'),
- ($tipo == 'grupo') ? 'grupo_secciones' : $tipo, 0, $tipo,
- 'nombre', $tipo . '_padre', 'ASC');
+ + arbol2array($db, ($tipo == 'grupo') ? 'grupo_secciones' : $tipo,
+ 0, $tipo, 'nombre', $tipo . '_padre', 'ASC');
// Saco el elemento actual si hay uno cargado (no puede ser padre de si mismo).
- if ($obj->$tipo) {
+ if ($accion & (AI_BAJA | AI_MODIF)) {
unset($tipos[$obj->$tipo]);
}
$fPadre =& $this->addElement('select', $padre, 'Padre', $tipos);
$fAntiguedad =& $this->addElement('select', 'antiguedad', 'Antigüedad',
array(3 => '3 días', 1 => '1 día', 7 => '1 semana'));
$fSecciones =& $this->addElement('select', 'secciones', 'Secciones',
- AI_GrupoSecciones::getSeccionesArray(AI_DB::connect('../conf/DB.ini')),
+ AI_GrupoSecciones::getSeccionesArray($db),
array('multiple' => 'multiple', 'size' => 8));
$fMostrarHijos =& $this->addElement('checkbox', 'mostrar_hijos', 'Mostrar hijos');
// Validación.