コード例 #1
0
ファイル: ci_auditoria.php プロジェクト: emma5021/toba
 function get_db($proyecto = null)
 {
     if (!isset($proyecto)) {
         $proyecto = $this->s__filtro['proyecto'];
     }
     $id = toba_info_editores::get_fuente_datos_defecto($proyecto);
     $fuente_datos = toba_admin_fuentes::instancia()->get_fuente($id, $proyecto);
     return $fuente_datos->get_db();
 }
コード例 #2
0
ファイル: ci_abms_principal.php プロジェクト: emma5021/toba
 function conf__form_basico(toba_ei_formulario $form)
 {
     $datos = $this->dep('datos')->tabla('base')->get();
     $datos_molde = $this->dep('datos')->tabla('molde')->get();
     if (!isset($datos_molde['fuente'])) {
         $datos['fuente'] = toba_info_editores::get_fuente_datos_defecto(toba_editor::get_proyecto_cargado());
     } else {
         $datos['fuente'] = $datos_molde['fuente'];
     }
     return $datos;
 }
コード例 #3
0
ファイル: toba_editor.php プロジェクト: emma5021/toba
 static function get_db_defecto()
 {
     $fuente = toba_info_editores::get_fuente_datos_defecto(toba_editor::get_proyecto_cargado());
     return toba::db($fuente, toba_editor::get_proyecto_cargado());
 }
コード例 #4
0
ファイル: ci_conf_auditoria.php プロジェクト: emma5021/toba
 function existe_auditoria($proyecto)
 {
     $id = toba_info_editores::get_fuente_datos_defecto($proyecto);
     $info = toba::proyecto($proyecto)->get_info_fuente_datos($id, $proyecto);
     $tiene_metadato = $info['tiene_auditoria'] == 1;
     $manejador = $this->get_manejador($proyecto);
     //Para que la auditoria funcione, tiene que tener el schema y la configuracion por metadato
     return $tiene_metadato && isset($manejador) && $manejador->existe();
 }
コード例 #5
0
ファイル: ci_principal.php プロジェクト: emma5021/toba
 function conf__prop_basicas($form)
 {
     $datos = $this->get_entidad()->tabla('prop_basicas')->get();
     if (!isset($datos['fuente_datos'])) {
         $datos['fuente_datos_proyecto'] = toba_editor::get_proyecto_cargado();
         $datos['fuente_datos'] = toba_info_editores::get_fuente_datos_defecto(toba_editor::get_proyecto_cargado());
     }
     // Hay extension
     $param_editor = toba_componente_info::get_utileria_editor_parametros(array('proyecto' => $this->id_objeto['proyecto'], 'componente' => $this->id_objeto['objeto']), 'ap');
     if (isset($datos['punto_montaje'])) {
         $param_editor['punto_montaje'] = $datos['punto_montaje'];
     }
     $eliminar_extension = !isset($this->id_objeto);
     //Si es alta no se puede extender
     if ($this->s__ap_php_db) {
         $form->evento('ver_php')->vinculo()->set_parametros($param_editor);
         if ($this->s__ap_php_archivo) {
             // El archivo de la extension existe
             $abrir = toba_componente_info::get_utileria_editor_abrir_php(array('proyecto' => $this->id_objeto['proyecto'], 'componente' => $this->id_objeto['objeto']), 'ap');
             $form->set_js_abrir($abrir['js']);
             $eliminar_extension = true;
         } else {
             $form->evento('ver_php')->set_imagen('nucleo/php_ap_inexistente.gif');
             $form->eliminar_evento('abrir_php');
             $form->evento('extender_ap')->vinculo()->set_parametros($param_editor);
         }
     } else {
         $form->eliminar_evento('ver_php');
         $form->eliminar_evento('abrir_php');
         $form->evento('extender_ap')->vinculo()->set_parametros($param_editor);
     }
     if ($eliminar_extension) {
         $form->eliminar_evento('extender_ap');
     }
     $form->set_datos($datos);
 }
コード例 #6
0
 /**
  * Retorna arreglo asociativo con parametros de la conexion a la fuente de de datos predeterminada
  * @return array
  */
 function get_parametros_db_negocio()
 {
     $fuentes = $this->get_indice_fuentes();
     if (empty($fuentes)) {
         return;
     }
     $fuente_defecto = toba_info_editores::get_fuente_datos_defecto($this->identificador);
     if (!isset($fuente_defecto)) {
         $fuente_defecto = current($fuentes);
     }
     $id_def_base = $this->construir_id_def_base($fuente_defecto);
     return $this->get_instalacion()->get_parametros_base($id_def_base);
 }