This file contains hidden or 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 | |
class myModelForm extends BaseModelForm | |
{ | |
public function saveEmbeddedForms($con = null, $forms = null) | |
{ | |
// nop, don't trust this | |
} | |
public function processUploadedFile($field, $filename = null, $values = null) |
This file contains hidden or 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
import threading, time, urllib | |
import fileinput, io | |
class UrlDownloadThread ( threading.Thread ): | |
def __init__(self, url): | |
self.url = url | |
threading.Thread.__init__(self) | |
def run(self): |
This file contains hidden or 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
$this->dispatcher->connect('form.validation_error', function(sfEvent $event) { | |
$form = $event->getSubject(); | |
$error = $event['error']; | |
if(!$form->isCSRFProtected()) | |
{ | |
return; | |
} | |
$field_name = sfForm::getCSRFFieldName(); |
This file contains hidden or 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
static protected $zendLoaded = false; | |
public function registerZend() | |
{ | |
if (!self::$zendLoaded) | |
{ | |
return; | |
} |
NewerOlder