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 ServerRequest | |
{ | |
private $request; | |
public function __construct($server) | |
{ | |
$this->request = $server; | |
} |
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 defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* MySQL "Closure Table" for Kohana based on Bill Karwin design. | |
* | |
* @link http://www.slideshare.net/billkarwin/models-for-hierarchical-data | |
* @TODO improve | |
* | |
* sql schema: | |
* CREATE TABLE `closures` ( | |
* `id` int(11) NOT NULL AUTO_INCREMENT, |
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 | |
/** | |
* This file is part of the Kdyby (http://www.kdyby.org) | |
* | |
* Copyright (c) 2008, 2012 Filip Procházka (filip@prochazka.su) | |
* | |
* For the full copyright and license information, please view the file license.txt that was distributed with this source code. | |
*/ |
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 | |
namespace Model; | |
class Mapper extends \LeanMapper\DefaultMapper implements ITranslatingMapper | |
{ | |
/** | |
* @return string | |
*/ |
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
-- Retrieve descendants | |
-- ==================== | |
-- retrieve descendants of #4 | |
SELECT c.* | |
FROM Comments AS c | |
JOIN TreePaths AS t ON c.comment_id = t.descendant | |
WHERE t.ancestor = 4; | |
-- Retrieve ancestors |
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
$.nette.ext('fileUpload', { | |
init: function(rh){ | |
that = this; | |
$("form.fileUpload input[type=file]").on("change", this.onChangeFiles); | |
$("form.fileUpload").on("submit", this.onUploadSubmit); | |
}, | |
before: function(jqXHR, settings){ | |
var xhr = $.ajaxSettings.xhr(); | |
xhr.upload.onprogress = function(e){ | |
if(e.lengthComputable){ |
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 | |
namespace Kedrigern\Price; | |
header('Content-Type: text/html; charset=utf-8'); | |
class PriceEntity { | |
private $acceptable = array( | |
"CZK", "EUR", "USD" |
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 | |
namespace Kedrigern\Price; | |
header('Content-Type: text/html; charset=utf-8'); | |
class PriceEntity { | |
private $acceptable = array( | |
"CZK", "EUR", "USD" |