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 | |
class dmSecureModuleActionTask extends dmContextTask | |
{ | |
protected $module, $modulePath, $permissionName, $_options, $_arguments, $dbConn; | |
protected function configure() | |
{ | |
parent::configure(); |
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 | |
class dmPageSynchronizer | |
{ | |
protected | |
$moduleManager, | |
$nodeParentIdStmt; | |
public function __construct(dmModuleManager $moduleManager) | |
{ |
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 | |
/** | |
* Project doctrine form base class. | |
*/ | |
abstract class BaseFormDoctrine extends dmFormDoctrine | |
{ | |
/** | |
* @var sfDateFormat | |
*/ |
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
<script type="text/javascript"> | |
(function($){ | |
var printProcess = function(){ | |
var imgSrc = '<?php echo $product->getTicketGeneration()->get('Image')->getFullWebPath()?>'; | |
var subWnd = window.open('', 'stayTicketPrinterWindow', 'width=1024,height=800,resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no'); | |
if($('img', subWnd.document.body).size() === 0) | |
{ | |
var imgTag = $('<img/>').attr('src', imgSrc); | |
$(subWnd.document.body).append(imgTag); |
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
Hello Community, | |
When considering writting large apps with sf2, with a back and a front, some questions are occuring, about how to structure things. | |
Say we have one large website with a front-end for end-users and a back-end to feed the front-end, control objects, etc. | |
The two "apps" will use same models, obviously. | |
We'd like to separate our "views" on the models for the two apps (I call them "perspectives"). |
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 | |
class ItSsLoadPhpDataTask extends dmContextTask | |
{ | |
protected function configure() | |
{ | |
parent::configure(); | |
$this->addOption('files', 'f', sfCommandOption::PARAMETER_OPTIONAL | sfCommandOption::IS_ARRAY, 'Give files to load'); | |
$this->addOption('load-dump', 'l', sfCommandOption::PARAMETER_NONE, 'Loads db dump before'); |
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
The trick: | |
- overload sfBasicSecurityFilter->execute() method to check if $request->hasParameter('bypass_security') | |
and if this parameter is set to true | |
- overload dmUser actions executeSignin() and add request parameter bypass_security and set it to true | |
//apps/front/config/filters.yml | |
rendering: ~ |
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
def by_recipients(recipients) | |
@messages_query ||= db.prepare "SELECT id, sender, recipients, subject, size, created_at FROM message WHERE recipients LIKE ?" | |
@messages_query.execute("%#{recipients}%").map do |row| | |
Hash[row.fields.zip(row)].tap do |message| | |
message["recipients"] &&= ActiveSupport::JSON.decode message["recipients"] | |
end | |
end | |
end |
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
function _download() { | |
return new Promise(function (resolve, reject) { | |
debug("download", image.url); | |
var tmpName = tmp.tmpNameSync(); | |
var writable = fs.createWriteStream(tmpName); | |
var streamSource = request(image.url); | |
streamSource |
OlderNewer