Răsfoiți Sursa

#2 - PHP 5.4 compatibility issues.

AntonLV 13 ani în urmă
părinte
comite
0718fc263f

+ 1 - 1
inc/utils.inc.php

@@ -580,7 +580,7 @@ function _format_when ($iSec) {
             else if($i > 1 && $i <= 5)
             else if($i > 1 && $i <= 5)
             	$s .= _t('_x_day_ago', $i, 's');
             	$s .= _t('_x_day_ago', $i, 's');
             else {
             else {
-            	$iNow = mktime();
+            	$iNow = time();
             	$iNowDayOfYear = date('z', $iNow);
             	$iNowDayOfYear = date('z', $iNow);
 
 
             	$iDate = $iNow - $iSec; 
             	$iDate = $iNow - $iSec; 

+ 1 - 1
modules/boonex/developer/classes/BxDevNavigationItems.php

@@ -65,7 +65,7 @@ class BxDevNavigationItems extends BxTemplStudioNavigationItems {
         }
         }
     }
     }
 
 
-    public function performActionEdit() {
+    public function performActionEdit($bUpdateGrid = false) {
         $sAction = 'edit';
         $sAction = 'edit';
 
 
         $aIds = bx_get('ids');
         $aIds = bx_get('ids');

+ 1 - 1
modules/boonex/sites/classes/BxSitesForms.php

@@ -51,7 +51,7 @@ class BxSitesForms extends BxDolProfileForms
 
 
 		$iAccountId = $oForm->insert(array(
 		$iAccountId = $oForm->insert(array(
 			'owner_id' => bx_get_logged_profile_id(),
 			'owner_id' => bx_get_logged_profile_id(),
-			'created' => mktime(),
+			'created' => time(),
 			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
 			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
 		));
 		));
 
 

+ 1 - 1
modules/boonex/sites/classes/BxSitesGridBrowse.php

@@ -70,7 +70,7 @@ class BxSitesGridBrowse extends BxTemplGrid {
 
 
 		$iAccountId = $oForm->insert(array(
 		$iAccountId = $oForm->insert(array(
 			'owner_id' => bx_get_logged_profile_id(),
 			'owner_id' => bx_get_logged_profile_id(),
-			'created' => mktime(),
+			'created' => time(),
 			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
 			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
 		));
 		));
 
 

+ 5 - 5
modules/boonex/sites/classes/BxSitesGridOverview.php

@@ -41,7 +41,7 @@ class BxSitesGridOverview extends BxTemplGrid {
             return;
             return;
         }
         }
 
 
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime(); 
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . time(); 
 		$oForm->aParams['db']['submit_name'] = 'do_confirm';
 		$oForm->aParams['db']['submit_name'] = 'do_confirm';
 
 
         $iAccountId = (int)bx_get('account');
         $iAccountId = (int)bx_get('account');
@@ -96,7 +96,7 @@ class BxSitesGridOverview extends BxTemplGrid {
             return;
             return;
         }
         }
 
 
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime(); 
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . time(); 
 
 
         $iAccountId = (int)bx_get('account');
         $iAccountId = (int)bx_get('account');
         if($iAccountId !== false)
         if($iAccountId !== false)
@@ -132,7 +132,7 @@ class BxSitesGridOverview extends BxTemplGrid {
             return;
             return;
         }
         }
 
 
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime();
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . time();
         $oForm->aFormAttrs['onsubmit'] = 'return ' . $this->_oModule->_oConfig->getJsObject() . '.onCancelSubscription(this);'; 
         $oForm->aFormAttrs['onsubmit'] = 'return ' . $this->_oModule->_oConfig->getJsObject() . '.onCancelSubscription(this);'; 
 		$oForm->aParams['db']['submit_name'] = 'do_cancel';
 		$oForm->aParams['db']['submit_name'] = 'do_cancel';
 
 
@@ -187,7 +187,7 @@ class BxSitesGridOverview extends BxTemplGrid {
             return;
             return;
         }
         }
 
 
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime(); 
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . time(); 
 		$oForm->aParams['db']['submit_name'] = 'do_reactivate';
 		$oForm->aParams['db']['submit_name'] = 'do_reactivate';
 
 
         $iAccountId = (int)bx_get('account');
         $iAccountId = (int)bx_get('account');
@@ -236,7 +236,7 @@ class BxSitesGridOverview extends BxTemplGrid {
             return;
             return;
         }
         }
 
 
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime(); 
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . time(); 
 
 
         $iAccountId = (int)bx_get('account');
         $iAccountId = (int)bx_get('account');
         if($iAccountId !== false)
         if($iAccountId !== false)

+ 1 - 1
modules/boonex/sites/classes/BxSitesModule.php

@@ -172,7 +172,7 @@ class BxSitesModule extends BxDolModule
 		$iAccountId = $this->_oDb->insertAccount(array(
 		$iAccountId = $this->_oDb->insertAccount(array(
 			'owner_id' => $oAlert->iObject,
 			'owner_id' => $oAlert->iObject,
 			'domain' => $sDomain,
 			'domain' => $sDomain,
-			'created' => mktime(),
+			'created' => time(),
 			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
 			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
 		));
 		));
 
 

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

@@ -654,7 +654,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage {
 
 
             $bResult = true;
             $bResult = true;
             foreach($aBlocks as $aBlock) {
             foreach($aBlocks as $aBlock) {
-                $sTitleKey = $this->getSystemName($aBlock['title'] . '_' . mktime());
+                $sTitleKey = $this->getSystemName($aBlock['title'] . '_' . time());
                 $sTitleValue = _t($aBlock['title']);
                 $sTitleValue = _t($aBlock['title']);
 
 
                 unset($aBlock['id']);
                 unset($aBlock['id']);
@@ -667,7 +667,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage {
                 //--- Process Lang copy
                 //--- Process Lang copy
                 $sContentKey = $sContentValue = "";
                 $sContentKey = $sContentValue = "";
                 if($aBlock['type'] == BX_DOL_STUDIO_BP_BLOCK_LANG && $aBlock['content'] != '') {
                 if($aBlock['type'] == BX_DOL_STUDIO_BP_BLOCK_LANG && $aBlock['content'] != '') {
-                    $sContentKey = $this->getSystemName($aBlock['content'] . '_' . mktime());
+                    $sContentKey = $this->getSystemName($aBlock['content'] . '_' . time());
                     $sContentValue = _t($aBlock['content']);
                     $sContentValue = _t($aBlock['content']);
 
 
                     $aBlock['content'] = $sContentKey;
                     $aBlock['content'] = $sContentKey;

+ 1 - 1
studio/template/scripts/BxBaseStudioNavigationImport.php

@@ -52,7 +52,7 @@ class BxBaseStudioNavigationImport extends BxDolStudioNavigationImport {
             unset($aItem['id']);
             unset($aItem['id']);
             $aItem['set_name'] = $this->sSet;
             $aItem['set_name'] = $this->sSet;
             $aItem['module'] = BX_DOL_STUDIO_MODULE_CUSTOM;
             $aItem['module'] = BX_DOL_STUDIO_MODULE_CUSTOM;
-            $aItem['title'] .= '_' . mktime();
+            $aItem['title'] .= '_' . time();
             $aItem['icon'] = $mixedIcon != 0 ? $mixedIcon : '';
             $aItem['icon'] = $mixedIcon != 0 ? $mixedIcon : '';
             $aItem['active'] = 1;
             $aItem['active'] = 1;
             $aItem['order'] = $this->oDb->getItemOrderMax($this->sSet) + 1;
             $aItem['order'] = $this->oDb->getItemOrderMax($this->sSet) + 1;