Skip to content

Instantly share code, notes, and snippets.

Processing WelcomeController#index (for 76.91.13.187 at 2009-11-18 22:35:54) [GET]
Parameters: {"action"=>"index", "controller"=>"welcome"}
NoMethodError (undefined method `length' for nil:NilClass):
app/controllers/application_controller.rb:48:in `find_current_user'
app/controllers/application_controller.rb:42:in `user_setup'
/var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/rack/request_handler.rb:95:in `process_request'
/var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/application_spawner.rb:378:in `start_request_handler'
/var/lib/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/application_spawner.rb:336:in `handle_spawn_application'
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information by
* visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
<?php
// Adds the admin page to the wp-admin navigation
function sv_svn_update_pages() {
add_options_page('SVN Update', 'SVN Update', 8, __FILE__, 'sv_svn_update_page');
}
add_action('admin_menu', 'sv_svn_update_pages');
// Returns array with revision number and path
function sv_template_svn_info() {
$result = array();
// Create and array of all parent comments
$parents = array();
foreach ($comments as $cmnt) {
$parents[] = $cmnt->comment_parent;
}
// If the comment ID is in the array of parent above add a class
if ( in_array( $comment->comment_ID, $parents ) ){
$c[] = 'threaded-comment';
}
if ( ! $this->args['labels'] ) {
$default_labels = array (
'name' => _x(ucwords($post_type)),
'singular_name' => _x($post_type),
'add_new' => _x('Add New'),
'add_new_item' => sprintf(__('Add New %s'), $post_type),
'edit_item' => sprintf(__('Edit %s'), $post_type),
'new_item' => sprintf(__('New %s'), $post_type),
'view_item' => sprintf(__('View %s'), $post_type),
'search_items' => sprintf(__('Search New %s'), ucwords($post_type)),
function is_old_post($post_id=null){
$days = 15;
global $wp_query;
if(is_single() || is_page()) {
if(!$post_id) {
$post_id = $wp_query->post->ID;
}
$current_date = time();
$offset = $days *60*60*24;
$post_id = get_post($post_id);
/**
* Creates a nexus term on publish
*
* @param string $id
* @param string $post
* @return void
* @author Dan Cameron
*/
function autoadd_nexus_category($id, $post) {
if( $post->post_status == 'publish' && false === (wp_is_post_autosave($post) || wp_is_post_revision($post) )
function custom_taxes()
{
// Taxonomies
$universe_labels = array(
'name' => _x( 'Nexus', 'taxonomy general name' ),
'singular_name' => _x( 'Affiliate', 'taxonomy singular name' ),
'search_items' => __( 'Search Affiliations' ),
'all_items' => __( 'All Affiliates' ),
'parent_item' => __( 'Parent Affiliate' ),
'parent_item_colon' => __( 'Parent Affiliate:' ),
# Delete duplicate comments
// Creates a temp table of IDs to compare later
CREATE TEMPORARY TABLE unique_comments SELECT MAX(c1.comment_ID) as ID FROM wp_comments c1 GROUP BY c1.comment_content ORDER BY ID;
// If the comment ID isn't in the unique table delete it
DELETE FROM wp_comments WHERE comment_ID NOT IN (SELECT ID FROM unique_comments);
<?php //if ( !is_home() || !is_front_page() ): ?>
<div id="sub-form-wrap" class="grid_4 omega clearfix">
<div id="sub-form" class="clearfix">
<?php group_buying_subscription_form() ?>
</div><!-- // #sub-form.clearfix -->
</div>
<?php //endif ?>