Skip to content

Commit

Permalink
Added an activity for the import.
Browse files Browse the repository at this point in the history
  • Loading branch information
tburry committed Jul 20, 2010
1 parent 470722a commit ee3d449
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions applications/dashboard/models/class.importmodel.php
Expand Up @@ -40,7 +40,8 @@ class ImportModel extends Gdn_Model {
6 => 'AssignOtherIDs',
7 => 'InsertTables',
8 => 'UpdateCounts',
9 => 'CustomFinalization'
9 => 'CustomFinalization',
10 => 'AddActivity'
);

protected $_OverwriteSteps = array(
Expand All @@ -53,7 +54,8 @@ class ImportModel extends Gdn_Model {
7 => 'DeleteOverwriteTables',
8 => 'InsertTables',
9 => 'UpdateCounts',
10 => 'CustomFinalization'
10 => 'CustomFinalization',
11 => 'AddActivity'
);

/**
Expand All @@ -66,6 +68,18 @@ public function __construct($ImportPath = '') {
parent::__construct();
}

public function AddActivity() {
// Build the story for the activity.
$Header = $this->GetImportHeader();
$PorterVersion = GetValue('Vanilla Export', $Header, T('unknown'));
$SourceData = GetValue('Source', $Header, T('unknown'));
$Story = sprintf(T('Vanilla Export: %s, Source: %s'), $PorterVersion, $SourceData);

$ActivityModel = new ActivityModel();
$ActivityModel->Add(Gdn::Session()->UserID, 'Import', $Story);
return TRUE;
}

public function AssignUserIDs() {
// Assign user IDs of email matches.
$Sql = "update :_zUser i
Expand Down

0 comments on commit ee3d449

Please sign in to comment.