* Adjust codes.
This commit is contained in:
@@ -502,10 +502,14 @@ class installModel extends model
|
||||
*/
|
||||
public function grantPriv()
|
||||
{
|
||||
$data = fixer::input('post')
|
||||
->stripTags('company')
|
||||
->get();
|
||||
|
||||
$requiredFields = explode(',', $this->config->install->step5RequiredFields);
|
||||
foreach($requiredFields as $field)
|
||||
{
|
||||
if(empty($this->post->{$field}))
|
||||
if(empty($data->{$field}))
|
||||
{
|
||||
dao::$errors[] = $this->lang->install->errorEmpty[$field];
|
||||
return false;
|
||||
@@ -514,7 +518,7 @@ class installModel extends model
|
||||
|
||||
/* Insert a company. */
|
||||
$company = new stdclass();
|
||||
$company->name = strip_tags($this->post->company);
|
||||
$company->name = $data->company;
|
||||
$company->admins = ",{$this->post->account},";
|
||||
$this->dao->insert(TABLE_COMPANY)->data($company)->autoCheck()->exec();
|
||||
if(!dao::isError())
|
||||
|
||||
@@ -1260,7 +1260,7 @@ class upgradeModel extends model
|
||||
if(file_exists($fullPath))
|
||||
{
|
||||
$isDir = is_dir($fullPath);
|
||||
if(!is_writable($fullPath) or ($isDir and !$zfile->removeDir($fullPath)) or
|
||||
if(!is_writable($fullPath) or ($isDir and !$zfile->removeDir($fullPath)) or
|
||||
(!$isDir and !$zfile->removeFile($fullPath)))
|
||||
{
|
||||
$result[] = 'rm -f ' . ($isDir ? '-r ' : '') . $fullPath;
|
||||
|
||||
Reference in New Issue
Block a user