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 defined('SYSPATH') or die('No direct script access.'); | |
| class Route extends Kohana_Route { | |
| /** | |
| * Changed: | |
| * - use Cache module instead of Kohana::cache() | |
| * - append cached routes instead of assigning them directly | |
| */ | |
| public static function cache($save = FALSE) |
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
| // Border Radius | |
| .border-radius(@radius: 5px) { | |
| -webkit-border-radius: @radius; | |
| -moz-border-radius: @radius; | |
| border-radius: @radius; | |
| } | |
| // Drop shadows | |
| .box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) { | |
| -webkit-box-shadow: @shadow; |
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 | |
| public function action_index() | |
| { | |
| $causes_count = ORM::factory('cause')->count_all(); | |
| $causes = ORM::factory('cause')->paginate($causes_count)->find_all(); | |
| return compact('causes','causes_count'); | |
| } |
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 | |
| Route::set('help::index', 'pomoc'); | |
| Route::set('help::read','pomoc/<id>'); | |
| Route::set('cause::view','svrha/<id>(/<seo>)', array('id' => '[0-9]+','seo' => '.+'); | |
| Route::set('cause::add', 'dodaj_svrhu'); | |
| Route::set('user::login','login'); | |
| Route::set('user::signup','registracija'); |
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 | |
| public function action_feedback() | |
| { | |
| // Only AJAX requests! | |
| if ( ! $this->request->is_ajax()) | |
| return $this->redirect(); | |
| $feedback = new Model_Testimonial; | |
| $view = new View_Page_Feedback; | |
| $json = JSend::factory(array('html' => $view)); |
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 file { | |
| /** | |
| * Error code to signal that the file is missing | |
| * This is always a positive value because we can | |
| * consider files which didn't exist already as 'deleted'. | |
| */ | |
| const MISSING = 1; |
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 defined('SYSPATH') or die('No direct script access.'); | |
| class Kohana_ORM extends Model implements serializable { | |
| /** | |
| * Initialization storage for ORM models | |
| * @var array | |
| */ | |
| protected static $_init_cache = array(); |
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 url { | |
| protected $_static_extensions = array('ico','jpg','gif','bmp','png','js','css'); | |
| /** | |
| * Fetches an absolute site URL based on a URI segment. | |
| * | |
| * @param string site URI to convert |
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
| RewriteCond %{HTTP:X-Requested-With} !=XMLHttpRequest | |
| RewriteCond %{HTTP:X-REQUESTED-WITH} !^(XMLHttpRequest)$ |
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 | |
| public function delete_all() | |
| { | |
| $objects = $this->find_all() | |
| ->as_array($this->_primary_key); | |
| if (method_exists($this, '_delete_row')) | |
| { | |
| foreach ($objects as $object) |