}
+ /**
+ * modelAction
+ *
+ * @param bool $actionData
+ * @access public
+ * @return void
+ */
public function modelAction($actionData = false)
{
$this->settings = filter_var_array(
$_REQUEST,
array(
- 'schema' => FILTER_SANITIZE_STRING,
+ 'schema' => FILTER_SANITIZE_STRING,
'cattablename' => FILTER_SANITIZE_STRING,
- 'tablename' => FILTER_SANITIZE_STRING,
- 'sdate' => array(
+ 'tablename' => FILTER_SANITIZE_STRING,
+ 'sdate' => array(
'filter' => FILTER_VALIDATE_REGEXP,
'options' => array(
'regexp' => '%[0-9]{2}/[0-9]{2}/[0-9]{4}%'
// Determine if current user can edit configurations
if (!current_user_can('glm_members_management')) {
return array(
- 'status' => false,
+ 'status' => false,
'menuItemRedirect' => 'error',
- 'modelRedirect' => 'index',
- 'view' => 'admin/error/index.html',
- 'data' => array(
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => array(
'reason' => 'User does not have rights to make configuration changes.'
)
);
}
+ /**
+ * connectPostgresDb
+ *
+ * Make a connection to the given database for the site. (postgres)
+ * Sets the $this->dbh with the postgers database connection
+ *
+ * @param mixed $db_host
+ * @param mixed $db_name
+ * @param mixed $db_user
+ * @param mixed $db_password
+ * @access public
+ * @return void
+ */
public function connectPostgresDb($db_host, $db_name, $db_user, $db_password)
{
$connStr = "pgsql:";
}
+ /**
+ * addCategories
+ *
+ * Checks to see if there's an Event Category already in the database.
+ * If not it will create the entry.
+ * Sets up the class variables
+ * $this->categories (contains all the categories that get added keyed with
+ * category id)
+ * $this->oldCatMap (map of the old category id to new category ids)
+ *
+ * @access public
+ * @return void
+ */
public function addCategories()
{
$return = '';
return $return;
}
+ /**
+ * getTime
+ *
+ * Given a time string return the the following format of time
+ * H:i
+ * hour and minute
+ *
+ * @param mixed $time String with any time format
+ *
+ * @access public
+ * @return void
+ */
public function getTime($time)
{
if (!$time) {
return $dateTime->format('H:i');
}
+ /**
+ * getCityId
+ *
+ * Given a city name find and return the id of the city.
+ * If a city cannot be found then create city with that name.
+ *
+ * @param mixed $cityName Name of the city
+ *
+ * @access public
+ * @return id of city
+ */
public function getCityId($cityName)
{
$sql = "
}
}
+ /**
+ * addEvents
+ *
+ * Start with a clean set of event tables. ( delete all event data )
+ * Grab all events starting with the given start date.
+ * Enter them into the new event plugin tables.
+ *
+ * @access public
+ * @return void
+ */
public function addEvents()
{
// clear the events tables first