Skip to content

Instantly share code, notes, and snippets.

@jamesfinley
Created February 21, 2012 16:56
Show Gist options
  • Save jamesfinley/1877361 to your computer and use it in GitHub Desktop.
Save jamesfinley/1877361 to your computer and use it in GitHub Desktop.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once('application/libraries/Admin_Controller.php');
class Projects extends Admin_Controller {
//controller
public $controller_path = 'admin/projects';
//module and model
public $module_name = 'redacted_projects';
public $content_model_name = 'project_model';
//content
public $content_singular = 'project';
public $content_plural = 'projects';
public function action_create()
{
$_POST[$this->content_table_name]['delivery_method'] = implode(', ', $_POST[$this->content_table_name]['delivery_method']);
parent::action_create();
}
public function action_update($id)
{
$_POST[$this->content_table_name]['delivery_method'] = implode(', ', $_POST[$this->content_table_name]['delivery_method']);
parent::action_update($id);
}
}
@tomkrush
Copy link

beautiful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment