* Adjust the params of createDemoData when manual import.
This commit is contained in:
@@ -321,7 +321,7 @@ class api extends control
|
||||
{
|
||||
if($type == 'demo')
|
||||
{
|
||||
$libID = $this->api->createDemoData();
|
||||
$libID = $this->api->createDemoData($this->post->name, $this->post->baseUrl);
|
||||
return $this->sendSuccess(array('locate' => $this->createLink('api', 'index', "libID=$libID")));
|
||||
}
|
||||
|
||||
|
||||
@@ -741,7 +741,7 @@ class apiModel extends model
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function createDemoData($name, $baseUrl, $version)
|
||||
public function createDemoData($name, $baseUrl, $version = '16.0')
|
||||
{
|
||||
$firstAccount = $this->dao->select('account')->from(TABLE_USER)->orderBy('id_asc')->limit(1)->fetch('account');
|
||||
$currentAccount = isset($this->app->user->account) ? $this->app->user->account : $firstAccount;
|
||||
|
||||
Reference in New Issue
Block a user