This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function tweet($status) { | |
$username = 'TWITTER_USERNAME'; | |
$password = 'TWITTER_PASSWORD'; | |
App::import('Core', array('Xml', 'HttpSocket')); | |
$sckt = new HttpSocket(); | |
$res = $sckt->request( | |
array( | |
'method' => 'POST', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Cambia el parent_id del aro asociado al correspondiente al nuevo grupo | |
*/ | |
function afterSave($created) { | |
if(!$created && $this->id && isset($this->data['Usuario']['grupo_id'])) { | |
$aro = $this->Aro->find('first', | |
array( | |
'conditions' => array( | |
'model' => 'Usuario', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hacer tr.im de una URL en cakephp | |
*/ | |
function trim($url) { | |
// Quizás esto debiese ir en un archivo de configuración | |
$username = 'TR.IM_USERNAME'; | |
$password = 'TR.IM_PASSWORD'; | |
App::import('Core', array('Xml', 'HttpSocket')); //Esto va acá? |
NewerOlder