GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( e01879...7e1050 )
by Calima
08:53
created
Sistema/librerias/ORMbasico/DatabaseProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 {
4 4
     protected $resource;
5 5
     public abstract function connect($host, $user, $pass, $dbname);
6
-    public abstract function disconnect ();
6
+    public abstract function disconnect();
7 7
     public abstract function getErrorNo();
8 8
     public abstract function getError();
9 9
     public abstract function query($q);
Please login to merge, or discard this patch.
Sistema/librerias/ORMbasico/MySqlProvider.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,49 +4,49 @@
 block discarded – undo
4 4
  
5 5
 class MySqlProvider extends DatabaseProvider
6 6
 {
7
-    public function connect($host, $user, $pass, $dbname){
7
+    public function connect($host, $user, $pass, $dbname) {
8 8
         $this->resource = new mysqli($host, $user, $pass, $dbname);
9 9
  
10
-        if ($this->resource->connect_errno){ // Connection fails
10
+        if ($this->resource->connect_errno) { // Connection fails
11 11
             error_log($this->resource->connect_error);
12 12
         }
13 13
  
14 14
         return $this->resource;
15 15
     }
16
-    public function disconnect(){
16
+    public function disconnect() {
17 17
         return $this->resource->close();
18 18
     }
19
-    public function getErrorNo(){
19
+    public function getErrorNo() {
20 20
         return $this->resource->errno;
21 21
     }
22
-    public function getError(){
22
+    public function getError() {
23 23
         return $this->resource->error;
24 24
     }
25
-    public function query($q){
25
+    public function query($q) {
26 26
         return $this->resource->query($q);
27 27
     }
28
-    public function numRows($resource){
28
+    public function numRows($resource) {
29 29
         $num_rows = 0;
30 30
  
31
-        if ($resource){
31
+        if ($resource) {
32 32
             $num_rows = $resource->num_rows;
33 33
         }
34 34
  
35 35
         return $num_rows;
36 36
     }
37
-    public function fetchArray($result){
37
+    public function fetchArray($result) {
38 38
         return $result->fetch_assoc();
39 39
     }
40
-    public function isConnected(){
40
+    public function isConnected() {
41 41
         return !is_null($this->resource);
42 42
     }
43
-    public function escape($var){
43
+    public function escape($var) {
44 44
         return $this->resource->real_escape_string($var);
45 45
     }
46
-    public function getInsertedID(){
46
+    public function getInsertedID() {
47 47
         return $this->resource->insert_id;
48 48
     }
49
-    public function changeDB ($database){
49
+    public function changeDB($database) {
50 50
         return $this->resource->select_db($database);
51 51
     }
52 52
     public function setCharset($charset) {
Please login to merge, or discard this patch.
index.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -102,31 +102,31 @@
 block discarded – undo
102 102
 }
103 103
  
104 104
 switch ($lang) {
105
-  case 'en':
105
+    case 'en':
106 106
   $lang_file = 'lang.en.php';
107
-  break;
107
+    break;
108 108
  
109
-  case 'de':
109
+    case 'de':
110 110
   $lang_file = 'lang.de.php';
111
-  break;
111
+    break;
112 112
 
113
-  case 'zh':
113
+    case 'zh':
114 114
   $lang_file = 'lang.zh.php';
115
-  break;
115
+    break;
116 116
 
117
-  case 'pt':
117
+    case 'pt':
118 118
   $lang_file = 'lang.pt.php';
119
-  break;
119
+    break;
120 120
 
121
-  case 'pt':
121
+    case 'pt':
122 122
   $lang_file = 'lang.pt.php';
123
-  break;
123
+    break;
124 124
 
125
-  case 'es':
125
+    case 'es':
126 126
   $lang_file = 'lang.es.php';
127
-  break;
127
+    break;
128 128
  
129
-  default:
129
+    default:
130 130
   $lang_file = 'lang.en.php';
131 131
  
132 132
 }
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  * <http://www.calimaframework.com>.
24 24
  */
25 25
 
26
-require_once __DIR__.'/vendor/autoload.php';
26
+require_once __DIR__ . '/vendor/autoload.php';
27 27
 
28 28
 use Sistema\Nucleo;
29 29
 use Sistema\Ayudantes;
@@ -42,44 +42,44 @@  discard block
 block discarded – undo
42 42
 /** Cf directorio separador */
43 43
 defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
44 44
 /** Cf raiz del sitio */
45
-defined('SITE_ROOT')? null: define('SITE_ROOT', realpath(dirname(__FILE__)).DS);
45
+defined('SITE_ROOT') ? null : define('SITE_ROOT', realpath(dirname(__FILE__)) . DS);
46 46
 /** Cf PATH del sitio */
47
-defined('SITE_PATH') ? NULL : define ('SITE_PATH', realpath(dirname(__FILE__) . DS . '..' . DS) . DS);
47
+defined('SITE_PATH') ? NULL : define('SITE_PATH', realpath(dirname(__FILE__) . DS . '..' . DS) . DS);
48 48
 
49 49
 /** Cf definimos constante Ruta directa al nucleo de framework  */
50
-define('RUTA_NUCLEO', SITE_ROOT . 'Sistema'.DS.'Nucleo' . DS);
50
+define('RUTA_NUCLEO', SITE_ROOT . 'Sistema' . DS . 'Nucleo' . DS);
51 51
 
52 52
 # define para mvc erp
53 53
 
54 54
 /** Cf definimos constante  directa a la vista del framework  */
55
-define('VIEW_PATH', SITE_ROOT . 'mvc'.DS.'vistas' . DS);
55
+define('VIEW_PATH', SITE_ROOT . 'mvc' . DS . 'vistas' . DS);
56 56
 /** Cf definimos constante  directa a los controladores del framework  */
57
-define('CONTR_PATH', SITE_ROOT . 'mvc'.DS.'controladores' . DS);
57
+define('CONTR_PATH', SITE_ROOT . 'mvc' . DS . 'controladores' . DS);
58 58
 /** Cf definimos constante  directa a los modelos del framework  */
59
-define('RUTA_MOD', SITE_ROOT . 'mvc'.DS.'modelos' . DS);
59
+define('RUTA_MOD', SITE_ROOT . 'mvc' . DS . 'modelos' . DS);
60 60
 
61 61
 # define ruta a los stilos del public
62 62
 
63 63
 /** Cf definimos constante  directa a los css dentro del directorio public_ del framework  */
64
-define('CSS_PATH', SITE_ROOT . 'public_'.DS.'css' . DS);
64
+define('CSS_PATH', SITE_ROOT . 'public_' . DS . 'css' . DS);
65 65
 /** Cf definimos constante  directa a los css dentro del directorio public_ del framework  */
66
-define('IMG_PATH', SITE_ROOT . 'public_'.DS.'img' . DS);
66
+define('IMG_PATH', SITE_ROOT . 'public_' . DS . 'img' . DS);
67 67
 /** Cf definimos constante  directa a los js dentro del directorio public_ del framework  */
68
-define('JS_PATH', SITE_ROOT . 'public_'.DS.'js' . DS);
68
+define('JS_PATH', SITE_ROOT . 'public_' . DS . 'js' . DS);
69 69
 /** Cf definimos constante  directa a las librerias dentro  del framework  */
70
-define('RUTA_LIBS', SITE_ROOT . 'Sistema'.DS.'librerias' . DS);
70
+define('RUTA_LIBS', SITE_ROOT . 'Sistema' . DS . 'librerias' . DS);
71 71
 /** Cf definimos constante  directa a los ayudantes del framework  */
72
-define('RUTA_AYUDANTES', SITE_ROOT . 'Sistema'.DS.'ayudantes' . DS);
72
+define('RUTA_AYUDANTES', SITE_ROOT . 'Sistema' . DS . 'ayudantes' . DS);
73 73
 
74 74
 /** Cf definimos constante  directa a los lenguajes del framework  */
75
-define('RUTA_LENGUAJES', SITE_ROOT . 'Sistema'.DS.'lenguajes' . DS);
75
+define('RUTA_LENGUAJES', SITE_ROOT . 'Sistema' . DS . 'lenguajes' . DS);
76 76
 
77 77
 
78 78
 //LENGUAJES
79 79
 //En el directorio sistema lenguajes hay varios archivos php cada uno para crear las constantes en el idioma especifico
80 80
 //luego por get capturamos la variable lan al inicio de la aplicacion asi: www.tuapp.com/?lang=de
81 81
 
82
-if(isSet($_GET['lang']))
82
+if (isSet($_GET['lang']))
83 83
 {
84 84
     $lang = $_GET['lang'];
85 85
  
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
  
89 89
     setcookie('lang', $lang, time() + (3600 * 24 * 30));
90 90
 }
91
-else if(isSet($_SESSION['lang']))
91
+else if (isSet($_SESSION['lang']))
92 92
 {
93 93
     $lang = $_SESSION['lang'];
94 94
 }
95
-else if(isSet($_COOKIE['lang']))
95
+else if (isSet($_COOKIE['lang']))
96 96
 {
97 97
     $lang = $_COOKIE['lang'];
98 98
 }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 //require_once RUTA_NUCLEO . 'Cf_Autocarga.php';
149 149
 require_once RUTA_NUCLEO . 'CFConfiguracion.php';
150 150
 
151
-try{
151
+try {
152 152
    
153 153
     Nucleo\CFBootstrap::actuar(new Nucleo\CFSolicitud);
154 154
     //CFBootstrap::actuar(new CFSolicitud);
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,16 +87,13 @@
 block discarded – undo
87 87
     $_SESSION['lang'] = $lang;
88 88
  
89 89
     setcookie('lang', $lang, time() + (3600 * 24 * 30));
90
-}
91
-else if(isSet($_SESSION['lang']))
90
+} else if(isSet($_SESSION['lang']))
92 91
 {
93 92
     $lang = $_SESSION['lang'];
94
-}
95
-else if(isSet($_COOKIE['lang']))
93
+} else if(isSet($_COOKIE['lang']))
96 94
 {
97 95
     $lang = $_COOKIE['lang'];
98
-}
99
-else
96
+} else
100 97
 {
101 98
     $lang = 'es'; // por defecto el idioma para el app es español puede ser en, bt, de, zh
102 99
 }
Please login to merge, or discard this patch.
mvc/controladores/blogControlador.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
             if (isset($_POST['enviar'])&& isset($_POST['option1'])  ) {
62 62
                 
63 63
                 $datas->insertarDatos(
64
-                     $this->_ayuda->filtrarEntero($_POST['id']),
65
-                     $this->_ayuda->filtrarTexto($_POST['nombre']),
66
-                     $this->_ayuda->filtrarTexto($_POST['email']),
67
-                     $this->_ayuda->filtrarTexto($_POST['comentario'])
64
+                        $this->_ayuda->filtrarEntero($_POST['id']),
65
+                        $this->_ayuda->filtrarTexto($_POST['nombre']),
66
+                        $this->_ayuda->filtrarTexto($_POST['email']),
67
+                        $this->_ayuda->filtrarTexto($_POST['comentario'])
68 68
                     );
69 69
                 echo $this->_ayuda->filtrarEntero('id');
70 70
                 $_POST['option1']=false;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     
76 76
     public function insertarComentario(){
77 77
         
78
-         /*$this->_vista->titulo = 'Registro CalimaFramework';
78
+            /*$this->_vista->titulo = 'Registro CalimaFramework';
79 79
             if(isset($_GET['titulo'])){
80 80
             $this->_vista->salida_campo = $_GET['titulo'];
81 81
             }
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -19,46 +19,46 @@  discard block
 block discarded – undo
19 19
         $this->_ayuda = new Sistema\Ayudantes\CFPHPAyuda();
20 20
     }
21 21
     
22
-    public function index(){
22
+    public function index() {
23 23
         $datas = $this->cargaModelo('blog');       
24 24
         
25
-        $this->_vista->postear= $datas->llamarDatosBlog();
26
-        $this->_vista->categorias= $datas->llamarDatosCategoria();
27
-        $this->_vista->tags= $datas->llamarDatosTags();
25
+        $this->_vista->postear = $datas->llamarDatosBlog();
26
+        $this->_vista->categorias = $datas->llamarDatosCategoria();
27
+        $this->_vista->tags = $datas->llamarDatosTags();
28 28
         $this->_vista->titulo = 'Blog Calima Framework';
29 29
         $this->_vista->imprimirVista('index', 'blog');       
30 30
         
31 31
     }
32
-    public function crearpost(){
32
+    public function crearpost() {
33 33
         $datas = $this->cargaModelo('blog');       
34 34
         
35
-        $this->_vista->postear= $datas->llamarDatosBlog();
35
+        $this->_vista->postear = $datas->llamarDatosBlog();
36 36
         $this->_vista->titulo = 'Blog Calima Framework crear post';
37 37
         $this->_vista->imprimirVista('crearpost', 'blog');  
38 38
         
39 39
     }
40 40
     
41
-    public function wikipost(){
41
+    public function wikipost() {
42 42
         $datas = $this->cargaModelo('blog');       
43 43
         
44
-        $this->_vista->postear= $datas->llamarDatosBlog();
45
-        $this->_vista->tags= $datas->llamarDatosTags();
46
-        $this->_vista->comentarios= $datas->llamarComentarios();
47
-        $this->_vista->categorias= $datas->llamarDatosCategoria();
48
-        $this->_vista->contar= $datas->contarComentarios($_GET['id']);
49
-        $this->_vista->video= $datas->llamarDatosBlogId($_GET['id']);
44
+        $this->_vista->postear = $datas->llamarDatosBlog();
45
+        $this->_vista->tags = $datas->llamarDatosTags();
46
+        $this->_vista->comentarios = $datas->llamarComentarios();
47
+        $this->_vista->categorias = $datas->llamarDatosCategoria();
48
+        $this->_vista->contar = $datas->contarComentarios($_GET['id']);
49
+        $this->_vista->video = $datas->llamarDatosBlogId($_GET['id']);
50 50
         $this->_vista->titulo = 'Blog 1 Calima Framework';
51 51
         $this->_vista->imprimirVista('wikipost', 'blog');  
52 52
         
53 53
         
54 54
         $this->_vista->titulo = 'Registro CalimaFramework';
55
-            if(isset($_GET['titulo'])){
55
+            if (isset($_GET['titulo'])) {
56 56
             $this->_vista->salida_campo = $_GET['titulo'];
57 57
             }
58 58
             
59 59
             $this->_vista->imprimirVista('wikipost', 'blog');
60 60
             //$datas = $this->cargaModelo('blog');
61
-            if (isset($_POST['enviar'])&& isset($_POST['option1'])  ) {
61
+            if (isset($_POST['enviar']) && isset($_POST['option1'])) {
62 62
                 
63 63
                 $datas->insertarDatos(
64 64
                      $this->_ayuda->filtrarEntero($_POST['id']),
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
                      $this->_ayuda->filtrarTexto($_POST['comentario'])
68 68
                     );
69 69
                 echo $this->_ayuda->filtrarEntero('id');
70
-                $_POST['option1']=false;
70
+                $_POST['option1'] = false;
71 71
                 
72 72
             }
73 73
         
74 74
     }
75 75
     
76
-    public function insertarComentario(){
76
+    public function insertarComentario() {
77 77
         
78 78
          /*$this->_vista->titulo = 'Registro CalimaFramework';
79 79
             if(isset($_GET['titulo'])){
Please login to merge, or discard this patch.
mvc/controladores/contactosControlador.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         
38 38
                    
39 39
        
40
-       if (isset($_POST['email'])) {
40
+        if (isset($_POST['email'])) {
41 41
         $para="[email protected]";
42 42
         $this->_ayuda->enviarCorreo(
43 43
                 $_POST['email'],
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
         
11 11
         // cargamos la clase ayudantes para usar sus metodos de ayuda
12 12
        
13
-        $this->_ayuda= new Sistema\Ayudantes\CFPHPAyuda();
13
+        $this->_ayuda = new Sistema\Ayudantes\CFPHPAyuda();
14 14
     }
15 15
     
16 16
     public function index()
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
         $this->_vista->imprimirVista('index', 'inicio');
20 20
         
21 21
         if (isset($_POST['email'])) {
22
-            $this->_vista->validar=1;
23
-        $para="[email protected]";
22
+            $this->_vista->validar = 1;
23
+        $para = "[email protected]";
24 24
         $this->_ayuda->enviarCorreo(
25 25
                 $_POST['email'],
26 26
                 $this->_ayuda->filtrarTexto($_POST['asunto']),
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                    
39 39
        
40 40
        if (isset($_POST['email'])) {
41
-        $para="[email protected]";
41
+        $para = "[email protected]";
42 42
         $this->_ayuda->enviarCorreo(
43 43
                 $_POST['email'],
44 44
                 $this->_ayuda->filtrarTexto($_POST['asunto']),
Please login to merge, or discard this patch.
mvc/controladores/errorControlador.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@
 block discarded – undo
6 6
  * and open the template in the editor.
7 7
  */
8 8
 
9
-class errorControlador extends \Sistema\Nucleo\CFControlador{
9
+class errorControlador extends \Sistema\Nucleo\CFControlador {
10 10
     
11 11
     public function __construct() {
12 12
         parent::__construct();
13 13
     }
14 14
     
15
-    public function index(){
15
+    public function index() {
16 16
         
17
-        $this->_vista->titulo="Error detectado";
18
-        $this->_vista->imprimirVista('index','error');
17
+        $this->_vista->titulo = "Error detectado";
18
+        $this->_vista->imprimirVista('index', 'error');
19 19
     }
20 20
     
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
mvc/controladores/indexControlador.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 //verificamos la version de php en tu servidor web o local
28 28
 if (version_compare(PHP_VERSION, '5.3.20', '<'))
29 29
 {
30
-	die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: '.PHP_VERSION);
30
+    die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: '.PHP_VERSION);
31 31
 }
32 32
 
33 33
 //Cargamos los Espacios de nombres para el nucleo y los ayudantes
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
        
49 49
         $this->_ayuda= new Sisayu\CFPHPAyuda;
50 50
         //$this->cargaAyudante('CfPHPAyuda');
51
-		//$this->cargaAyudante('CfPHPSeguridad');
51
+        //$this->cargaAyudante('CfPHPSeguridad');
52 52
         $this->_seg= new Sisayu\CfPHPSeguridad;
53 53
         
54 54
         $this->_sesion=new Sisnuc\CFSesion();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 //verificamos la version de php en tu servidor web o local
28 28
 if (version_compare(PHP_VERSION, '5.3.20', '<'))
29 29
 {
30
-	die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: '.PHP_VERSION);
30
+	die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: ' . PHP_VERSION);
31 31
 }
32 32
 
33 33
 //Cargamos los Espacios de nombres para el nucleo y los ayudantes
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
     public function __construct() {
47 47
         parent::__construct();
48 48
        
49
-        $this->_ayuda= new Sisayu\CFPHPAyuda;
49
+        $this->_ayuda = new Sisayu\CFPHPAyuda;
50 50
         //$this->cargaAyudante('CfPHPAyuda');
51 51
 		//$this->cargaAyudante('CfPHPSeguridad');
52
-        $this->_seg= new Sisayu\CfPHPSeguridad;
52
+        $this->_seg = new Sisayu\CfPHPSeguridad;
53 53
         
54
-        $this->_sesion=new Sisnuc\CFSesion();
54
+        $this->_sesion = new Sisnuc\CFSesion();
55 55
          
56 56
     }
57 57
     
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
     { 
60 60
         // Se verifica que en el archivo de configuracion.php la constante Cf_CONFIG_INICIO==true
61 61
         //Si esta en True se lanza el instalador de Cf
62
-        if(Cf_CONFIG_INICIO==true){
62
+        if (Cf_CONFIG_INICIO == true) {
63 63
             
64 64
             $this->_vista->titulo = 'CalimaFramework';
65 65
             $this->_vista->imprimirVista('index', 'instalador');
66 66
             $this->_sesion->iniciarSesion('_s', false);
67 67
             
68
-        }elseif (Cf_CONFIG_INICIO=='false') {
68
+        }elseif (Cf_CONFIG_INICIO == 'false') {
69 69
             
70 70
             $this->_vista->titulo = 'CalimaFramework';
71 71
             $this->_vista->imprimirVista('index', 'instalador');
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             $this->_vista->imprimirVista('index', 'instalador');
66 66
             $this->_sesion->iniciarSesion('_s', false);
67 67
             
68
-        }elseif (Cf_CONFIG_INICIO=='false') {
68
+        } elseif (Cf_CONFIG_INICIO=='false') {
69 69
             
70 70
             $this->_vista->titulo = 'CalimaFramework';
71 71
             $this->_vista->imprimirVista('index', 'instalador');
Please login to merge, or discard this patch.
mvc/controladores/usuarioControlador.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
         $nombre=$_POST['nombre'];
39 39
         $email=$_POST['email'];
40 40
         $usuario=$_POST['nombre'];
41
-         $clave=$this->_seg->cifrado($this->_seg->filtrarTexto($_POST['clave']));
41
+            $clave=$this->_seg->cifrado($this->_seg->filtrarTexto($_POST['clave']));
42 42
         
43
-         $datas->insertarRegistro(
44
-                     $this->_seg->filtrarTexto($_POST['nombre']),
45
-                     $this->_seg->filtrarTexto($_POST['email']),
46
-                     '1',
47
-                     $clave
43
+            $datas->insertarRegistro(
44
+                        $this->_seg->filtrarTexto($_POST['nombre']),
45
+                        $this->_seg->filtrarTexto($_POST['email']),
46
+                        '1',
47
+                        $clave
48 48
                     );
49 49
                 $this->_ayuda->redireccionUrl('usuario');
50 50
                 //$_POST['option1']=false;
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
             $_SESSION['usuario']=$usuario;
68 68
             $this->_ayuda->redireccionUrl('index');         
69 69
         }
70
-       $this->_ayuda->redireccionUrl('usuario');
70
+        $this->_ayuda->redireccionUrl('usuario');
71 71
         
72 72
         }
73 73
     }
74 74
     
75
-     public function cerrarSesion(){
75
+        public function cerrarSesion(){
76 76
         $this->_sesion->iniciarSesion('_s', false);
77 77
         session_destroy();
78 78
         $this->_sesion->destruir('usuario');
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
         parent::__construct();
11 11
                
12 12
         // cargamos la clase ayudantes para usar sus metodos de ayuda       
13
-        $this->_ayuda= new Sistema\Ayudantes\CFPHPAyuda;        
14
-        $this->_seg= new Sistema\Ayudantes\CFPHPSeguridad;
15
-        $this->_sesion=new Sistema\Nucleo\CFSesion();       
13
+        $this->_ayuda = new Sistema\Ayudantes\CFPHPAyuda;        
14
+        $this->_seg = new Sistema\Ayudantes\CFPHPSeguridad;
15
+        $this->_sesion = new Sistema\Nucleo\CFSesion();       
16 16
     }    
17 17
     
18
-    public function index(){        
18
+    public function index() {        
19 19
         $this->_vista->titulo = 'CalimaFramework Login';
20 20
         $this->_vista->error = 'CalimaFramework Login';
21 21
         $this->_vista->imprimirVista('index', 'usuario');  
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         
24 24
     }  
25 25
     
26
-    public function registro(){ 
26
+    public function registro() { 
27 27
         
28 28
         $this->_vista->titulo = 'CalimaFramework registro';
29 29
         $this->_vista->imprimirVista('registro', 'usuario');
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
         //echo$_SESSION['something'];
33 33
     }
34 34
     
35
-    public function crearRegistro(){
35
+    public function crearRegistro() {
36 36
         $datas = $this->cargaModelo('usuario');    
37
-        if(isset($_POST['nombre'])){
38
-        $nombre=$_POST['nombre'];
39
-        $email=$_POST['email'];
40
-        $usuario=$_POST['nombre'];
41
-         $clave=$this->_seg->cifrado($this->_seg->filtrarTexto($_POST['clave']));
37
+        if (isset($_POST['nombre'])) {
38
+        $nombre = $_POST['nombre'];
39
+        $email = $_POST['email'];
40
+        $usuario = $_POST['nombre'];
41
+         $clave = $this->_seg->cifrado($this->_seg->filtrarTexto($_POST['clave']));
42 42
         
43 43
          $datas->insertarRegistro(
44 44
                      $this->_seg->filtrarTexto($_POST['nombre']),
@@ -49,22 +49,22 @@  discard block
 block discarded – undo
49 49
                 $this->_ayuda->redireccionUrl('usuario');
50 50
                 //$_POST['option1']=false;
51 51
         }
52
-        else{
52
+        else {
53 53
             $this->_ayuda->redireccionUrl('usuario/registro');
54 54
         }
55 55
     }
56 56
     
57
-    public function valida(){
58
-        if(isset($_POST['usuario'])){
59
-        $usuario=$_POST['usuario'];
60
-        echo $clave=$this->_seg->cifrado($this->_seg->filtrarTexto($_POST['clave']));
57
+    public function valida() {
58
+        if (isset($_POST['usuario'])) {
59
+        $usuario = $_POST['usuario'];
60
+        echo $clave = $this->_seg->cifrado($this->_seg->filtrarTexto($_POST['clave']));
61 61
         
62 62
         $datosUser = $this->cargaModelo('usuario');
63
-        $valida=$datosUser->seleccionUsuario($usuario, $clave);  
63
+        $valida = $datosUser->seleccionUsuario($usuario, $clave);  
64 64
         
65
-        if(isset($valida)){
65
+        if (isset($valida)) {
66 66
             $this->_sesion->iniciarSesion('_s', false);
67
-            $_SESSION['usuario']=$usuario;
67
+            $_SESSION['usuario'] = $usuario;
68 68
             $this->_ayuda->redireccionUrl('index');         
69 69
         }
70 70
        $this->_ayuda->redireccionUrl('usuario');
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         }
73 73
     }
74 74
     
75
-     public function cerrarSesion(){
75
+     public function cerrarSesion() {
76 76
         $this->_sesion->iniciarSesion('_s', false);
77 77
         session_destroy();
78 78
         $this->_sesion->destruir('usuario');
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@
 block discarded – undo
48 48
                     );
49 49
                 $this->_ayuda->redireccionUrl('usuario');
50 50
                 //$_POST['option1']=false;
51
-        }
52
-        else{
51
+        } else{
53 52
             $this->_ayuda->redireccionUrl('usuario/registro');
54 53
         }
55 54
     }
Please login to merge, or discard this patch.
mvc/modelos/blogModelo.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -13,67 +13,67 @@
 block discarded – undo
13 13
         parent::__construct();
14 14
     }
15 15
     
16
-    public function insertarDatos($id_blog, $nombre,  $email, $comentario){
16
+    public function insertarDatos($id_blog, $nombre, $email, $comentario) {
17 17
         
18
-        $post=$this->_bd->consulta('INSERT INTO comentarios (id_blog, nombre, email, comentario) VALUES (:id_blog, :nombre, :email, :comentario)');
19
-        $post=$this->_bd->enlace(':id_blog', $id_blog);
20
-        $post=$this->_bd->enlace(':nombre',$nombre);
21
-        $post=$this->_bd->enlace(':email', $email);
22
-        $post=$this->_bd->enlace(':comentario', $comentario);
23
-        $post=$this->_bd->ejecucion();
24
-        return $post=$this->_bd->resultset();
18
+        $post = $this->_bd->consulta('INSERT INTO comentarios (id_blog, nombre, email, comentario) VALUES (:id_blog, :nombre, :email, :comentario)');
19
+        $post = $this->_bd->enlace(':id_blog', $id_blog);
20
+        $post = $this->_bd->enlace(':nombre', $nombre);
21
+        $post = $this->_bd->enlace(':email', $email);
22
+        $post = $this->_bd->enlace(':comentario', $comentario);
23
+        $post = $this->_bd->ejecucion();
24
+        return $post = $this->_bd->resultset();
25 25
         
26 26
     }
27 27
     
28
-    public function llamarDatosCategoria(){
28
+    public function llamarDatosCategoria() {
29 29
         //echo DB_HOST;
30
-        $cate=$this->_bd->consulta('select * from categoria ');
31
-        return $cate=$this->_bd->resultset();//=$this->_bd->resultset();$post->fetchall();
30
+        $cate = $this->_bd->consulta('select * from categoria ');
31
+        return $cate = $this->_bd->resultset(); //=$this->_bd->resultset();$post->fetchall();
32 32
         
33 33
        
34 34
     }
35 35
     
36
-    public function llamarDatosTags(){
36
+    public function llamarDatosTags() {
37 37
         //echo DB_HOST;
38
-        $post=$this->_bd->consulta('select * from tags ');
39
-        return $post=$this->_bd->resultset();//=$this->_bd->resultset();$post->fetchall();
38
+        $post = $this->_bd->consulta('select * from tags ');
39
+        return $post = $this->_bd->resultset(); //=$this->_bd->resultset();$post->fetchall();
40 40
         
41 41
        
42 42
     }
43 43
     
44 44
     
45
-    public function llamarDatosBlog(){
45
+    public function llamarDatosBlog() {
46 46
         //echo DB_HOST;
47
-        $post=$this->_bd->consulta('select * from blog ');
48
-        return $post=$this->_bd->resultset();//=$this->_bd->resultset();$post->fetchall();
47
+        $post = $this->_bd->consulta('select * from blog ');
48
+        return $post = $this->_bd->resultset(); //=$this->_bd->resultset();$post->fetchall();
49 49
         
50 50
        
51 51
     }
52 52
     
53
-    public function llamarDatosBlogId($id){
53
+    public function llamarDatosBlogId($id) {
54 54
         //echo DB_HOST;
55
-        $idvideo=$id;
56
-        $datosQuery="select idvideo from blog where id = :idvideo";
57
-        $gsent=$this->_bd->consulta('SELECT idvideo FROM blog WHERE id = :idvideo');
58
-        $gsent=$this->_bd->enlace(':idvideo', $idvideo);
55
+        $idvideo = $id;
56
+        $datosQuery = "select idvideo from blog where id = :idvideo";
57
+        $gsent = $this->_bd->consulta('SELECT idvideo FROM blog WHERE id = :idvideo');
58
+        $gsent = $this->_bd->enlace(':idvideo', $idvideo);
59 59
         //$gsent=$this->_bd->ejecucion();
60
-        $row = $gsent=$this->_bd->single();
60
+        $row = $gsent = $this->_bd->single();
61 61
         return  $row;
62 62
        
63 63
     }
64 64
     
65
-    public function llamarComentarios(){
65
+    public function llamarComentarios() {
66 66
         //echo DB_HOST;
67
-        $post=$this->_bd->consulta('select * from comentarios ');
68
-        return $post=$this->_bd->resultset();//=$this->_bd->resultset();$post->fetchall();
67
+        $post = $this->_bd->consulta('select * from comentarios ');
68
+        return $post = $this->_bd->resultset(); //=$this->_bd->resultset();$post->fetchall();
69 69
         
70 70
        
71 71
     }
72 72
     
73
-    public function contarComentarios($id){
73
+    public function contarComentarios($id) {
74 74
         //echo DB_HOST;
75
-        $post=$this->_bd->consulta('SELECT COUNT(*) FROM comentarios');
76
-        return $post=$this->_bd->resultset();//=$this->_bd->resultset();$post->fetchall();
75
+        $post = $this->_bd->consulta('SELECT COUNT(*) FROM comentarios');
76
+        return $post = $this->_bd->resultset(); //=$this->_bd->resultset();$post->fetchall();
77 77
         
78 78
        
79 79
     }
Please login to merge, or discard this patch.