Skip to content

Instantly share code, notes, and snippets.

View marceloandrader's full-sized avatar
🏠
Working from home

Marcelo Andrade marceloandrader

🏠
Working from home
View GitHub Profile
@marceloandrader
marceloandrader / readme.md
Created July 9, 2024 14:44
Problema paymentez

problema con pago en linea

Screenshot 2024-07-09 093105 Screenshot 2024-07-08 205211

import docNameParsing from 'dummy/utils/doc-name-parsing'
import { module, test } from 'qunit'
import { A } from '@ember/array'
import Ember from 'ember'
module('Unit | Utility | doc name parsing')
function getDataNeeded (fileName) {
return {
fileName,
#!/bin/bash
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood and Chris Hanson.
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
#
<?php
$pw = $endpoint->edit($model->pw_id, $payload);
$pw->custom_fields['_payload'] = $payload;
/*
* if the opportunity has the dummy contact still related to it, remove the relation
*/
if ($resourceName == CRM::RES_OPPORTUNITY) {
$dummyContact = Clients::findFirst('user_id = 8165');
if (!empty($dummyContact) && ($dummyContact->pw_id === null || $dummyContact->pw_id == 0)) {
$dummyContact = Clients::findFirst('pw_id IS NOT NULL AND pw_id > 0');
<?php namespace Test\Handler;
use mef\DB\Mock\Driver;
use mef\DB\Mock\SequentialArrayDataProvider;
use mef\Db\Driver\DataProvider\SequentialArrayDataProvider as OldSequentialArrayDataProvider;
use mef\Db\Driver\DataProviderDriver as OldDriver;
use Fibroblast\Handler\AcceptTermsHandler;
use Fibroblast\Command\AcceptTermsCommand;
/**
* AcceptTermsHandlerTest documentation @TODO...
module Main exposing (..)
import Debug exposing (log)
import Task
import Date exposing (Date)
import Date.Format exposing (format)
import Html exposing (..)
import Html.Attributes exposing (class, classList, type_, style, href, checked, value)
import Html.Events exposing (onInput, onClick, onCheck, onSubmit)
diff --git a/app/libraries/Core/Entity.php b/app/libraries/Core/Entity.php
index 454652b..05d3abb 100644
--- a/app/libraries/Core/Entity.php
+++ b/app/libraries/Core/Entity.php
@@ -224,13 +224,14 @@ class Entity extends \PhalconRest\API\Entity
// this must be attached w/ the parent records for joining purposes
$relatedRecordIds = null;
$refModel = new $refModelNameSpace();
- $primaryKeyName = $refModel->getPrimaryKeyName();
+ $primaryKeyName = 'child_id'; // $refModel->getPrimaryKeyName();
diff --git a/src/API/Entity.php b/src/API/Entity.php
index 45721dc..eacacf8 100644
--- a/src/API/Entity.php
+++ b/src/API/Entity.php
@@ -439,7 +439,7 @@ class Entity extends \Phalcon\DI\Injectable
// but can we do this with out breaking everything?
if ($relation->getType() == 0 or $relation->getType() == 1) {
// create both sides of the join
- $left = $alias . '.' . $relation->getReferencedFields();
+ $left = '[' . $alias . '].' . $relation->getReferencedFields();
diff --git a/src/API/Entity.php b/src/API/Entity.php
index 476073b..b81e574 100644
--- a/src/API/Entity.php
+++ b/src/API/Entity.php
@@ -465,7 +465,11 @@ class Entity extends \Phalcon\DI\Injectable
$fieldName = $this->prependFieldNameNamespace($processedSearchField['fieldName']);
$operator = $this->determineWhereOperator($processedSearchField['fieldValue']);
$newFieldValue = $this->processFieldValue($processedSearchField['fieldValue'], $operator);
- $query->andWhere("$fieldName $operator \"$newFieldValue\"");
+ if ($operator === 'LIKE') {