| Total Complexity | 63 |
| Total Lines | 544 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 2 | Features | 0 |
Complex classes like informe_residentes often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use informe_residentes, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 37 | class informe_residentes extends residentes_controller |
||
| 38 | { |
||
| 39 | /** |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | public $bloque; |
||
| 43 | /** |
||
| 44 | * @var string |
||
| 45 | */ |
||
| 46 | public $cliente; |
||
| 47 | /** |
||
| 48 | * @var string |
||
| 49 | */ |
||
| 50 | public $clientes; |
||
| 51 | public $desde; |
||
| 52 | public $hasta; |
||
| 53 | public $resultados; |
||
| 54 | public $tipo; |
||
| 55 | public $residentes; |
||
| 56 | public $edificaciones; |
||
| 57 | public $total; |
||
| 58 | public $total_resultado; |
||
| 59 | public $lista; |
||
| 60 | public $vehiculos; |
||
| 61 | public $codigo_edificacion; |
||
| 62 | public $edificaciones_tipo; |
||
| 63 | public $edificaciones_mapa; |
||
| 64 | public $inmuebles_libres; |
||
| 65 | public $inmuebles_ocupados; |
||
| 66 | public $total_vehiculos; |
||
| 67 | public $limit; |
||
| 68 | public $offset; |
||
| 69 | public $order; |
||
| 70 | public $search; |
||
| 71 | public $sort; |
||
| 72 | public $archivo = 'Residentes'; |
||
| 73 | public $archivoXLSX; |
||
| 74 | public $archivoXLSXPath; |
||
| 75 | public $documentosDir; |
||
| 76 | public $exportDir; |
||
| 77 | public $publicPath; |
||
| 78 | public $where_code; |
||
| 79 | public $pagos_pendientes; |
||
| 80 | public $pagos_realizados; |
||
| 81 | |||
| 82 | public function __construct() |
||
| 85 | } |
||
| 86 | |||
| 87 | protected function private_core() |
||
| 88 | { |
||
| 89 | $this->shared_extensions(); |
||
| 90 | $this->init_variables(); |
||
| 91 | $this->init_filters(); |
||
| 92 | |||
| 93 | $tipos = $this->edificaciones_tipo->all(); |
||
| 94 | $this->padre = $tipos[0]; |
||
|
|
|||
| 95 | |||
| 96 | $this->tipo = 'informacion'; |
||
| 97 | if (isset($_GET['tipo'])) { |
||
| 98 | $this->tipo = $_GET['tipo']; |
||
| 99 | } |
||
| 100 | |||
| 101 | if ($this->tipo === 'mostrar_informacion_residente') { |
||
| 102 | $this->mostrar_informacion_residente(); |
||
| 103 | } |
||
| 104 | |||
| 105 | $this->codigo_edificacion = null; |
||
| 106 | if ($this->filter_request('codigo_edificacion')) { |
||
| 107 | $this->codigo_edificacion = $this->filter_request('codigo_edificacion'); |
||
| 108 | } |
||
| 109 | |||
| 110 | if ($this->codigo_edificacion) { |
||
| 111 | $this->where_code = " AND r.codigo like '" . $this->codigo_edificacion . "%' "; |
||
| 112 | } |
||
| 113 | |||
| 114 | if ($this->tipo === 'informacion') { |
||
| 115 | $this->mapa = $this->edificaciones_mapa->get_by_field('id_tipo', $this->padre->id); |
||
| 116 | $this->informacion_edificaciones(); |
||
| 117 | } |
||
| 118 | |||
| 119 | if ($this->filter_request('lista')) { |
||
| 120 | $this->procesarLista($this->filter_request('lista')); |
||
| 121 | } |
||
| 122 | } |
||
| 123 | |||
| 124 | public function init_variables() |
||
| 125 | { |
||
| 126 | $this->edificaciones_tipo = new residentes_edificaciones_tipo(); |
||
| 127 | $this->edificaciones_mapa = new residentes_edificaciones_mapa(); |
||
| 128 | $this->edificaciones = new residentes_edificaciones(); |
||
| 129 | $this->vehiculos = new residentes_vehiculos(); |
||
| 130 | $this->clientes = new cliente(); |
||
| 131 | } |
||
| 132 | |||
| 133 | public function init_filters() |
||
| 134 | { |
||
| 135 | $this->desde = \Date('01-m-Y'); |
||
| 136 | if ($this->filter_request('desde')) { |
||
| 137 | $this->desde = $this->filter_request('desde'); |
||
| 138 | } |
||
| 139 | |||
| 140 | $this->hasta = \Date('t-m-Y'); |
||
| 141 | if ($this->filter_request('hasta')) { |
||
| 142 | $this->hasta = $this->filter_request('hasta'); |
||
| 143 | } |
||
| 144 | |||
| 145 | $sort = $this->filter_request('sort'); |
||
| 146 | $order = $this->filter_request('order'); |
||
| 147 | $this->offset = $this->confirmarValor($this->filter_request('offset'), 0); |
||
| 148 | $this->limit = $this->confirmarValor($this->filter_request('limit'), FS_ITEM_LIMIT); |
||
|
1 ignored issue
–
show
|
|||
| 149 | $this->search = $this->confirmarValor($this->filter_request('search'), false); |
||
| 150 | $this->sort = ($sort and $sort!='undefined')?$sort:'r.codigo, r.numero'; |
||
| 151 | $this->order = ($order and $order!='undefined')?$order:'ASC'; |
||
| 152 | } |
||
| 153 | |||
| 154 | public function informacion_edificaciones() |
||
| 155 | { |
||
| 156 | $this->resultado = array(); |
||
| 157 | [$edificaciones, $inmuebles, $vehiculos, $inmuebles_ocupados] = $this->datosInformacion(); |
||
| 158 | foreach ($edificaciones as $edif) { |
||
| 159 | $l = new stdClass(); |
||
| 160 | $l->descripcion = $edif['descripcion']; |
||
| 161 | $l->cantidad = $edif['total']; |
||
| 162 | $this->resultado[] = $l; |
||
| 163 | } |
||
| 164 | if ($inmuebles) { |
||
| 165 | $l = new stdClass(); |
||
| 166 | $l->descripcion = 'Inmueble'; |
||
| 167 | $l->cantidad = $inmuebles; |
||
| 168 | $this->resultado[] = $l; |
||
| 169 | } |
||
| 170 | |||
| 171 | //Verificamos los que están ocupados |
||
| 172 | $this->inmuebles_libres = $inmuebles-$inmuebles_ocupados; |
||
| 173 | $this->inmuebles_ocupados = $inmuebles_ocupados; |
||
| 174 | $this->total_vehiculos = $vehiculos; |
||
| 175 | $this->carpetasPlugin(); |
||
| 176 | $this->generarArchivoExcel(); |
||
| 177 | } |
||
| 178 | |||
| 179 | public function generarArchivoExcel() |
||
| 180 | { |
||
| 181 | $this->archivoXLSX = $this->exportDir . DIRECTORY_SEPARATOR . |
||
| 182 | $this->archivo . "_" . $this->user->nick . ".xlsx"; |
||
| 183 | $this->archivoXLSXPath = $this->publicPath . DIRECTORY_SEPARATOR . |
||
| 184 | $this->archivo . "_" . $this->user->nick . ".xlsx"; |
||
| 185 | if (file_exists($this->archivoXLSX)) { |
||
| 186 | unlink($this->archivoXLSX); |
||
| 187 | } |
||
| 188 | $writer = new XLSXWriter(); |
||
|
1 ignored issue
–
show
|
|||
| 189 | $headerR = array( |
||
| 190 | 'Código'=>'string', |
||
| 191 | 'Residente'=>'string', |
||
| 192 | FS_CIFNIF=>'string', |
||
|
1 ignored issue
–
show
|
|||
| 193 | 'Teléfono'=>'string', |
||
| 194 | 'Email'=>'string', |
||
| 195 | 'Ubicación'=>'string', |
||
| 196 | 'Inmueble'=>'string', |
||
| 197 | 'Fecha de Ocupación'=>'date'); |
||
| 198 | $headerTextR = array( |
||
| 199 | 'codcliente'=>'Código', |
||
| 200 | 'nombre'=>'Residente', |
||
| 201 | 'cifnif'=>FS_CIFNIF, |
||
| 202 | 'telefono1'=>'Teléfono', |
||
| 203 | 'email'=>'Email', |
||
| 204 | 'codigo'=>'Ubicación', |
||
| 205 | 'numero'=>'Inmueble', |
||
| 206 | 'fecha_ocupacion'=>'Fecha Ocupación'); |
||
| 207 | $dataResidentes = $this->lista_residentes(true); |
||
| 208 | $this->crearXLSX($writer, 'Residentes', $headerR, $headerTextR, $dataResidentes[0]); |
||
| 209 | $headerI = array( |
||
| 210 | 'Pertenece'=>'string', |
||
| 211 | 'Edificación'=>'string', |
||
| 212 | 'Código'=>'string', |
||
| 213 | 'Residente'=>'string', |
||
| 214 | FS_CIFNIF=>'string', |
||
| 215 | 'Teléfono'=>'string', |
||
| 216 | 'Email'=>'string', |
||
| 217 | 'Ubicación'=>'string', |
||
| 218 | 'Inmueble Nro'=>'integer', |
||
| 219 | 'Fecha de Ocupación'=>'date', |
||
| 220 | 'Ocupado'=>'string'); |
||
| 221 | $headerTextI = array( |
||
| 222 | 'padre_desc'=>'Pertenece', |
||
| 223 | 'edif_desc'=>'Edificacion', |
||
| 224 | 'codcliente'=>'Código', |
||
| 225 | 'nombre'=>'Residente', |
||
| 226 | 'cifnif'=>FS_CIFNIF, |
||
| 227 | 'telefono1'=>'Teléfono', |
||
| 228 | 'email'=>'Email', |
||
| 229 | 'codigo'=>'Ubicación', |
||
| 230 | 'numero'=>'Inmueble Nro', |
||
| 231 | 'fecha_ocupacion'=>'Fecha Ocupación', |
||
| 232 | 'ocupado'=>'Ocupado'); |
||
| 233 | $dataInmuebles = $this->lista_inmuebles(true); |
||
| 234 | $this->crearXLSX($writer, 'Inmuebles', $headerI, $headerTextI, $dataInmuebles[0]); |
||
| 235 | $headerC = array( |
||
| 236 | 'Código'=>'string', |
||
| 237 | 'Residente'=>'string', |
||
| 238 | FS_CIFNIF=>'string', |
||
| 239 | 'Teléfono'=>'string', |
||
| 240 | 'Email'=>'string', |
||
| 241 | 'Ubicación'=>'string', |
||
| 242 | 'Inmueble'=>'string', |
||
| 243 | 'Pagado'=>'price', |
||
| 244 | 'Pendiente'=>'price'); |
||
| 245 | $headerTextC = array( |
||
| 246 | 'codcliente'=>'Código', |
||
| 247 | 'nombre'=>'Residente', |
||
| 248 | 'cifnif'=>FS_CIFNIF, |
||
| 249 | 'telefono1'=>'Teléfono', |
||
| 250 | 'email'=>'Email', |
||
| 251 | 'codigo'=>'Ubicación', |
||
| 252 | 'numero'=>'Inmueble', |
||
| 253 | 'pagado'=>'Pagado', |
||
| 254 | 'pendiente'=>'Pendiente'); |
||
| 255 | $dataCobros = $this->lista_cobros(true); |
||
| 256 | $this->crearXLSX($writer, 'Cobros', $headerC, $headerTextC, $dataCobros[0]); |
||
| 257 | $writer->writeToFile($this->archivoXLSXPath); |
||
| 258 | $this->fileXLSX = $this->archivoXLSXPath; |
||
| 259 | } |
||
| 260 | |||
| 261 | public function datosInformacion() |
||
| 262 | { |
||
| 263 | //Cantidad de Edificaciones |
||
| 264 | $sql_edificaciones = "SELECT ret.id,ret.descripcion, count(rme.id) as total " . |
||
| 265 | "FROM residentes_edificaciones_tipo as ret " . |
||
| 266 | " join residentes_mapa_edificaciones as rme on (rme.id_tipo = ret.id) " . |
||
| 267 | " group by ret.id,ret.descripcion " . |
||
| 268 | " order by ret.padre;"; |
||
| 269 | $data_edificaciones = $this->db->select($sql_edificaciones); |
||
| 270 | //cantidad de Inmuebles |
||
| 271 | $sql_inmuebles = "select count(*) as total from residentes_edificaciones;"; |
||
| 272 | $data_inmuebles = $this->db->select($sql_inmuebles); |
||
| 273 | //cantidad de Inmuebles Ocupados |
||
| 274 | $sql_inmuebles_ocupados = "select count(*) as total from residentes_edificaciones WHERE ocupado = true;"; |
||
| 275 | $data_inmuebles_ocupados = $this->db->select($sql_inmuebles_ocupados); |
||
| 276 | //cantidad de Vehiculos |
||
| 277 | $sql_vehiculos = "select count(*) as total from residentes_vehiculos;"; |
||
| 278 | $data_vehiculos = $this->db->select($sql_vehiculos); |
||
| 279 | |||
| 280 | return array( |
||
| 281 | $data_edificaciones, |
||
| 282 | $data_inmuebles[0]['total'], |
||
| 283 | $data_vehiculos[0]['total'], |
||
| 284 | $data_inmuebles_ocupados[0]['total'] |
||
| 285 | ); |
||
| 286 | } |
||
| 287 | |||
| 288 | public function procesarLista($lista) |
||
| 289 | { |
||
| 290 | $this->template = false; |
||
|
1 ignored issue
–
show
|
|||
| 291 | switch ($lista) { |
||
| 292 | case 'informe_residentes': |
||
| 293 | [$resultados, $cantidad] = $this->lista_residentes(); |
||
| 294 | break; |
||
| 295 | case 'informe_inmuebles': |
||
| 296 | [$resultados, $cantidad] = $this->lista_inmuebles(); |
||
| 297 | break; |
||
| 298 | case 'informe_cobros': |
||
| 299 | [$resultados, $cantidad] = $this->lista_cobros(); |
||
| 300 | break; |
||
| 301 | default: |
||
| 302 | break; |
||
| 303 | } |
||
| 304 | header('Content-Type: application/json'); |
||
| 305 | $data['rows'] = $resultados; |
||
| 306 | $data['total'] = $cantidad; |
||
| 307 | echo json_encode($data, JSON_THROW_ON_ERROR); |
||
| 308 | } |
||
| 309 | |||
| 310 | public function lista_residentes ($todo = false) |
||
| 325 | } |
||
| 326 | |||
| 327 | public function lista_inmuebles($todo = false) |
||
| 328 | { |
||
| 329 | $sql = "select r.id, r.codcliente, c.nombre, c.cifnif, c.telefono1, c.email, r.codigo, r.numero, ". |
||
| 330 | "case when r.ocupado then 'Si' else 'NO' end as ocupado, r.fecha_ocupacion, rme.padre_id, ". |
||
| 331 | "ret.descripcion as padre_desc, rme.codigo_padre, ret2.descripcion as edif_desc, codigo_edificacion ". |
||
| 332 | " from residentes_edificaciones as r ". |
||
| 333 | " join residentes_mapa_edificaciones as rme on (r.id_edificacion = rme.id ".$this->where_code.") ". |
||
| 334 | " join residentes_edificaciones_tipo as ret on (rme.padre_tipo = ret.id) ". |
||
| 335 | " join residentes_edificaciones_tipo as ret2 on (rme.id_tipo = ret2.id) ". |
||
| 336 | " left join clientes as c on (r.codcliente = c.codcliente) ". |
||
| 337 | " order by ".$this->sort." ".$this->order; |
||
| 338 | if ($todo) { |
||
| 339 | $data = $this->db->select($sql); |
||
| 340 | } else { |
||
| 341 | $data = $this->db->select_limit($sql, $this->limit, $this->offset); |
||
| 342 | } |
||
| 343 | |||
| 344 | $sql_cantidad = "select count(r.id) as total from residentes_edificaciones as r"; |
||
| 345 | if ($this->where_code) { |
||
| 346 | $sql_cantidad.=" WHERE r.codigo!='' ".$this->where_code; |
||
| 347 | } |
||
| 348 | $data_cantidad = $this->db->select($sql_cantidad); |
||
| 349 | return array($data, $data_cantidad[0]['total']); |
||
| 350 | } |
||
| 351 | |||
| 352 | public function lista_cobros($todo = false) |
||
| 353 | { |
||
| 354 | $sql = "select r.codcliente, c.nombre, c.cifnif, c.telefono1, c.email, r.codigo, r.numero, ". |
||
| 355 | "sum(f1.total) as pagado, sum(f2.total) as pendiente ". |
||
| 356 | " from residentes_edificaciones as r ". |
||
| 357 | " join clientes as c on (r.codcliente = c.codcliente ".$this->where_code.") ". |
||
| 358 | " left join (select codcliente,anulada,pagada, sum(total) as total ". |
||
| 359 | "from facturascli group by codcliente,anulada, pagada ) as f1 on ". |
||
| 360 | "(r.codcliente = f1.codcliente and f1.anulada = false and f1.pagada = true) ". |
||
| 361 | " left join (select codcliente,anulada,pagada, sum(total) as total ". |
||
| 362 | "from facturascli group by codcliente,anulada, pagada ) as f2 on ". |
||
| 363 | "(r.codcliente = f2.codcliente and f2.anulada = false and f2.pagada = false) ". |
||
| 364 | " group by r.codcliente, c.nombre, c.cifnif, c.telefono1, c.email, r.codigo, r.numero ". |
||
| 365 | " order by ".$this->sort." ".$this->order; |
||
| 366 | if ($todo) { |
||
| 367 | $data = $this->db->select($sql); |
||
| 368 | } else { |
||
| 369 | $data = $this->db->select_limit($sql, $this->limit, $this->offset); |
||
| 370 | } |
||
| 371 | |||
| 372 | $sql_cantidad = "select count(r.id) as total ". |
||
| 373 | " from residentes_edificaciones as r". |
||
| 374 | " where r.codcliente != '' ".$this->where_code; |
||
| 375 | $data_cantidad = $this->db->select($sql_cantidad); |
||
| 376 | return array($data, $data_cantidad[0]['total']); |
||
| 377 | } |
||
| 378 | |||
| 379 | // public function informacion_interna($id) |
||
| 380 | // { |
||
| 381 | // $lista_tipo = $this->edificaciones_tipo->get_by_field('padre', $id); |
||
| 382 | // if ($lista_tipo) { |
||
| 383 | // foreach ($lista_tipo as $linea) { |
||
| 384 | // $l = new stdClass(); |
||
| 385 | // $l->descripcion = $linea->descripcion; |
||
| 386 | // $l->cantidad = count($this->edificaciones_mapa->get_by_field('id_tipo', $linea->id)); |
||
| 387 | // $this->resultado[] = $l; |
||
| 388 | // $this->total_resultado++; |
||
| 389 | // $this->informacion_interna($linea->id); |
||
| 390 | // } |
||
| 391 | // } else { |
||
| 392 | // return true; |
||
| 393 | // } |
||
| 394 | // } |
||
| 395 | |||
| 396 | /** |
||
| 397 | * Función para devolver un valor u otro dependiendo si está presente |
||
| 398 | * el primer valor y si la variable existe |
||
| 399 | * @param string $variable |
||
| 400 | * @param string $valor_si |
||
| 401 | * @param string $valor_no |
||
| 402 | * @return string |
||
| 403 | */ |
||
| 404 | public function setValor($variable, $valor_si, $valor_no) |
||
| 405 | { |
||
| 406 | $valor = $valor_no; |
||
| 407 | if (!empty($variable) && ($variable === $valor_si)) { |
||
| 408 | $valor = $valor_si; |
||
| 409 | } |
||
| 410 | return $valor; |
||
| 411 | } |
||
| 412 | |||
| 413 | /** |
||
| 414 | * Función para devolver el valor que no esté vacio |
||
| 415 | * @param string $valor1 |
||
| 416 | * @param string $valor2 |
||
| 417 | * @return string |
||
| 418 | */ |
||
| 419 | public function confirmarValor($valor1, $valor2) |
||
| 420 | { |
||
| 421 | $valor = $valor2; |
||
| 422 | if (!empty($valor1)) { |
||
| 423 | $valor = $valor1; |
||
| 424 | } |
||
| 425 | return $valor; |
||
| 426 | } |
||
| 427 | |||
| 428 | /** |
||
| 429 | * Función para devolver el valor de una variable pasada ya sea por POST o GET |
||
| 430 | * @param type string |
||
| 431 | * @return type string |
||
| 432 | */ |
||
| 433 | public function filter_request($nombre) |
||
| 434 | { |
||
| 435 | $nombre_post = \filter_input(INPUT_POST, $nombre); |
||
| 436 | $nombre_get = \filter_input(INPUT_GET, $nombre); |
||
| 437 | return ($nombre_post) ?: $nombre_get; |
||
| 438 | } |
||
| 439 | |||
| 440 | public function filter_request_array($nombre) |
||
| 441 | { |
||
| 442 | $nombre_post = \filter_input(INPUT_POST, $nombre, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY); |
||
| 443 | $nombre_get = \filter_input(INPUT_GET, $nombre, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY); |
||
| 444 | return ($nombre_post) ?: $nombre_get; |
||
| 445 | } |
||
| 446 | |||
| 447 | public function crearXLSX(&$writer, $hoja_nombre, $header, $headerText, $data) |
||
| 448 | { |
||
| 449 | $style_header = array('border'=>'left,right,top,bottom','font'=>'Arial','font-size'=>10,'font-style'=>'bold'); |
||
| 450 | $writer->writeSheetRow($hoja_nombre, $headerText, $style_header); |
||
| 451 | $writer->writeSheetHeader($hoja_nombre, $header, true); |
||
| 452 | $this->agregarDatosXLSX($writer, $hoja_nombre, $data, $headerText); |
||
| 453 | } |
||
| 454 | |||
| 455 | public function agregarDatosXLSX(&$writer, $hoja_nombre, $datos, $indice) |
||
| 456 | { |
||
| 457 | $total_importe = 0; |
||
| 458 | if ($datos) { |
||
| 459 | foreach ($datos as $linea) { |
||
| 460 | $data = $this->prepararDatosXLSX($linea, $indice, $total_importe); |
||
| 461 | $writer->writeSheetRow($hoja_nombre, $data); |
||
| 462 | } |
||
| 463 | } |
||
| 464 | } |
||
| 465 | |||
| 466 | public function prepararDatosXLSX($linea, $indice, &$total_importe) |
||
| 467 | { |
||
| 468 | $item = array(); |
||
| 469 | foreach ($indice as $idx=>$desc) { |
||
| 470 | $item[] = $linea[$idx]; |
||
| 471 | if ($idx === 'total') { |
||
| 472 | $total_importe += $linea['total']; |
||
| 473 | } |
||
| 474 | } |
||
| 475 | return $item; |
||
| 476 | } |
||
| 477 | |||
| 478 | public function carpetasPlugin() |
||
| 479 | { |
||
| 480 | $basepath = dirname(__DIR__, 3); |
||
| 481 | $this->documentosDir = $basepath . DIRECTORY_SEPARATOR . FS_MYDOCS . 'documentos'; |
||
|
1 ignored issue
–
show
|
|||
| 482 | $this->exportDir = $this->documentosDir . DIRECTORY_SEPARATOR . "informes_residentes"; |
||
| 483 | $this->publicPath = FS_PATH . FS_MYDOCS . 'documentos' . DIRECTORY_SEPARATOR . 'informes_residentes'; |
||
| 484 | if (!is_dir($this->documentosDir)) { |
||
| 485 | if (!mkdir($concurrentDirectory = $this->documentosDir) && !is_dir($concurrentDirectory)) { |
||
| 486 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory)); |
||
| 487 | } |
||
| 488 | } |
||
| 489 | |||
| 490 | if (!is_dir($this->exportDir)) { |
||
| 491 | if (!mkdir($concurrentDirectory = $this->exportDir) && !is_dir($concurrentDirectory)) { |
||
| 492 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory)); |
||
| 493 | } |
||
| 494 | } |
||
| 495 | } |
||
| 496 | |||
| 497 | public function url() |
||
| 498 | { |
||
| 499 | if (isset($_REQUEST['inmueble'])) { |
||
| 500 | return 'index.php?page=informe_residentes&inmueble=' . $_REQUEST['inmueble']; |
||
| 501 | } else { |
||
| 502 | return parent::url(); |
||
| 503 | } |
||
| 504 | } |
||
| 505 | |||
| 506 | private function str2bool($v) |
||
| 507 | { |
||
| 508 | return ($v === 't' or $v === '1'); |
||
| 509 | } |
||
| 510 | |||
| 511 | public function shared_extensions() { |
||
| 581 | } |
||
| 582 | } |
||
| 583 | } |
||
| 584 | } |
||
| 585 |