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
public function filter_post_client_contact($client, $post) | |
{ | |
if(intval($post->info->client_contact) != 0) { | |
$client = User::get($post->info->client_contact); | |
} | |
return $client; | |
} |
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
$('.todo').live('keypress', function(ev){ | |
create = _.reduce($('.todo'), function(memo, el) { | |
return memo && $(el).val() != ''; | |
}, true); | |
if(create) { | |
$('#todolist').append(ich.t_todoitem({})); | |
} | |
}); |
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
public function action_plugin_activation( $plugin_file ) | |
{ | |
if(!User::get_by_name('github_hook')) { | |
User::create(array( | |
'username' => 'github_hook', | |
'email' => '[email protected]', | |
'password' => sha1(rand(0,pow(2,32))); | |
)); | |
} | |
} |
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
Query::__set_state(array( | |
'where' => | |
QueryWhere::__set_state(array( | |
'operator' => 'AND', | |
'expressions' => | |
array ( | |
1 => | |
QueryWhere::__set_state(array( | |
'operator' => 'AND', | |
'expressions' => |
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 | |
if(Utils::env_test()) { | |
Config::set( 'db_connection', array( | |
'connection_string'=>'sqlite:habari_unittest.db', | |
'username'=>'', | |
'password'=>'', | |
'prefix'=>'' | |
)); | |
Config::set('blog_data', array( | |
'admin_username' => 'admin', |
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
array ( | |
0 => 'SELECT | |
{posts}.id AS id, | |
{posts}.slug AS slug, | |
{posts}.title AS title, | |
{posts}.guid AS guid, | |
{posts}.content AS content, | |
{posts}.cached_content AS cached_content, | |
{posts}.user_id AS user_id, | |
{posts}.status AS status, |
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
array ( | |
0 => 'SELECT | |
{posts}.id AS id, | |
{posts}.slug AS slug, | |
{posts}.title AS title, | |
{posts}.guid AS guid, | |
{posts}.content AS content, | |
{posts}.cached_content AS cached_content, | |
{posts}.user_id AS user_id, | |
{posts}.status AS status, |
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
array ( | |
0 => 'SELECT | |
{posts}.id AS id, | |
{posts}.slug AS slug, | |
{posts}.title AS title, | |
{posts}.guid AS guid, | |
{posts}.content AS content, | |
{posts}.cached_content AS cached_content, | |
{posts}.user_id AS user_id, | |
{posts}.status AS status, |
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
/** | |
* Helper function: Displays the home page | |
* @param array $user_filters Additional arguments used to get the page content | |
*/ | |
public function act_display_home( $user_filters = array() ) | |
{ | |
$paramarray['fallback'] = array( | |
'home', | |
'multiple', | |
); |
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 | |
$post = Posts::get(array('slug' => 'habari', 'fetch_fn' => 'get_row')); | |
$related = Posts::get( array( 'vocabulary' => array( 'any:tags' => $post->tags) ) ); | |
Utils::debug($post->title, $related); | |
?> |