AntonLV 6 лет назад
Родитель
Сommit
2263cb2346
2 измененных файлов с 7 добавлено и 5 удалено
  1. 2 0
      install/sql/system.sql
  2. 5 5
      studio/template/scripts/BxBaseStudioBuilderPage.php

+ 2 - 0
install/sql/system.sql

@@ -4591,6 +4591,8 @@ CREATE TABLE `sys_transcoder_queue_files` (
 
 CREATE TABLE IF NOT EXISTS `sys_objects_page` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
+  `author` int(11) NOT NULL DEFAULT '0',
+  `added` int(11) NOT NULL DEFAULT '0',
   `object` varchar(64) NOT NULL,
   `uri` varchar(255) NOT NULL,
   `title_system` varchar(255) NOT NULL,

+ 5 - 5
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -290,14 +290,14 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
                     'name' => 'settings',
                     'content' => $oTemplate->parseHtmlByName('bp_edit_page_form.html', $this->_getTmplVarsPageSettings()),
                 ),
-			)
-		);
+            )
+        );
 
-		$oForm = new BxTemplStudioFormView($aForm);
+        $oForm = new BxTemplStudioFormView($aForm);
         $oForm->initChecker();
 
         if($oForm->isSubmittedAndValid()) {
-        	unset($oForm->aInputs['settings']);
+            unset($oForm->aInputs['settings']);
             foreach($this->aPageSettings as $aSetting)
                 $oForm->aInputs = array_merge($oForm->aInputs, $this->{'getSettings' . $this->getClassName($aSetting['name']) . 'Fields'}());
 
@@ -317,7 +317,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
             BxDolForm::setSubmittedValue('visible_for_levels', $iVisibleFor, $aForm['form_attrs']['method']);
             unset($oForm->aInputs['visible_for']);
 
-            $iId = (int)$oForm->insert(array('object' => $sObject, 'url' => $this->sPageBaseUrl . $sUri));
+            $iId = (int)$oForm->insert(array('author' => bx_get_logged_profile_id(), 'added' => time(), 'object' => $sObject, 'url' => $this->sPageBaseUrl . $sUri));
             if($iId != 0)
                 return array('eval' => $sJsObject . '.onCreatePage(\'' . $sModule . '\', \'' . $sObject . '\')');
             else