Skip to content
Snippets Groups Projects
Commit f9c42799 authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-129] Merging from testing into staging

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@755 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 6620089f
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,12 @@ function unl_schema() { ...@@ -56,6 +56,12 @@ function unl_schema() {
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
), ),
'department' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
), ),
'primary key' => array('site_id'), 'primary key' => array('site_id'),
...@@ -319,3 +325,12 @@ function unl_update_7107() { ...@@ -319,3 +325,12 @@ function unl_update_7107() {
db_create_table('unl_page_aliases', $table); db_create_table('unl_page_aliases', $table);
} }
function unl_update_7108() {
db_add_field('unl_sites', 'department', array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
));
}
...@@ -497,7 +497,9 @@ function unl_cron() { ...@@ -497,7 +497,9 @@ function unl_cron() {
$sites_to_create = array(); $sites_to_create = array();
foreach ($data as $site) { foreach ($data as $site) {
$department = $site->department; $full_department = $site->department;
$department = $full_department;
$department = strtr($department, array(' ' => '')); $department = strtr($department, array(' ' => ''));
$department = strtolower($department); $department = strtolower($department);
$department = preg_replace('/[^[a-z0-9]/', '', $department); $department = preg_replace('/[^[a-z0-9]/', '', $department);
...@@ -519,6 +521,7 @@ function unl_cron() { ...@@ -519,6 +521,7 @@ function unl_cron() {
'site_admin' => $site->site_admin ? $site->site_admin : '', 'site_admin' => $site->site_admin ? $site->site_admin : '',
'migration_url' => $site->migration_url ? $site->migration_url : '', 'migration_url' => $site->migration_url ? $site->migration_url : '',
'migration_path' => $site->migration_path ? $site->migration_path : '', 'migration_path' => $site->migration_path ? $site->migration_path : '',
'department' => $full_department,
); );
if (variable_get('unl_wdn_registry_production')) { if (variable_get('unl_wdn_registry_production')) {
...@@ -630,9 +633,32 @@ function unl_init() { ...@@ -630,9 +633,32 @@ function unl_init() {
function unl_mail($key, &$message, $params) { function unl_mail($key, &$message, $params) {
if ($key == 'site_created') { if ($key == 'site_created') {
$site = $params['site']; $site = $params['site'];
$message['subject'] = 'New Site!'; $uri = $site->uri;
$message['body'][] = 'A site has been set up!'; $site_admin = $site->site_admin;
$message['body'][] = print_r($site, TRUE); $department = $site->department;
$message['subject'] = 'New UNLcms site for ' . $department;
$message['body'][] = <<<EOF
To $site_admin,
Thank you for registering your site at UNLcms. You may now log in using your myUNL information by clicking the link below or copying and pasting it to your browser:
$uri
You must log in in order manage your web site and edit the content. The "Login" link is at the top of the page and you log in using your myUNL information.
For information on how to manage your site & content, please view the online how-to videos found in the menu at the top of the following page, within the category of "Get Help":
http://unlcms.unl.edu
When this new site was created, an attempt was made to copy the content from your current site to this new site. You will want to review all of the content to verify that it is complete and that it is presented correctly. This import process is dependent on the current's site using and adherence to UNL Templates.
Once your content has been finalized and your are ready to go public with your new site, please contact us to activate the proper public URL (cleaner and shorter). This current URL you've been given will not be indexed or found in search engines until the proper public URL has been established.
Please let us know if you have suggestions or questions.
Thank you,
EOF;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment