 		LEFT OUTER JOIN comunarr.generalTopic 
 		ON (temporaryIdTable.id = comunarr.generalTopic.id)
 		WHERE comunarr.generalTopic.id IS NULL
+        OR comunarr.generalTopic.status = 0
 	) THEN RETURN 0;
     
 	ELSE RETURN 1;

    
	ELSE
    
		# Delete the file's key words relations
        DELETE FROM comunarr.keyWord_file WHERE idFile = p_id;
        
        # Delete the file register
        DELETE FROM comunarr.file WHERE id = p_id;
        
        SELECT p_id AS 'id';
        
    END IF;

  `idUserType` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_userType_idx` (`idUserType`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
