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.'); | |
/** | |
* @author Kemal Delalic <[email protected]> | |
*/ | |
class View_Admin_System_Index extends View_Admin_Layout { | |
/** | |
* @var cache for self::mysql_processes() | |
*/ | |
protected $_mysql_processes; |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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) |
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 | |
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
<?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 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 | |
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 | |
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_index() | |
{ | |
$causes_count = ORM::factory('cause')->count_all(); | |
$causes = ORM::factory('cause')->paginate($causes_count)->find_all(); | |
return compact('causes','causes_count'); | |
} |