Просмотр исходного кода

Modules updates: textareas processing fix.

AntonLV 10 лет назад
Родитель
Сommit
e90dfc500f

+ 4 - 1
modules/boonex/contact/updates/8.0.4_9.0.0/install/installer.php

@@ -18,7 +18,10 @@ class BxContactUpdater extends BxDolStudioUpdater
 			if(!file_exists($sFile)) {
 				$aEntries = $this->oDb->getAll('SELECT * FROM `bx_contact_entries`');
 				foreach($aEntries as $aEntry)
-					$this->oDb->query('UPDATE `bx_contact_entries` SET `body`=? WHERE `id`=?', nl2br(htmlspecialchars_adv($aEntry['body'])), $aEntry['id']);
+					$this->oDb->query('UPDATE `bx_contact_entries` SET `body`=:body WHERE `id`=:id', array(
+						'body' => nl2br(htmlspecialchars_adv($aEntry['body'])), 
+						'id' => $aEntry['id']
+					));
 
 				$oHandler = fopen($sFile, 'w');
 				if($oHandler) {

+ 4 - 1
modules/boonex/invites/updates/8.0.3_9.0.0/install/installer.php

@@ -21,7 +21,10 @@ class BxInvUpdater extends BxDolStudioUpdater
 			if(!file_exists($sFile)) {
 				$aEntries = $this->oDb->getAll('SELECT * FROM `bx_inv_requests`');
 				foreach($aEntries as $aEntry)
-					$this->oDb->query('UPDATE `bx_inv_requests` SET `text`=? WHERE `id`=?', nl2br(htmlspecialchars_adv($aEntry['text'])), $aEntry['id']);
+					$this->oDb->query('UPDATE `bx_inv_requests` SET `text`=:text WHERE `id`=:id', array(
+						'text' => nl2br(htmlspecialchars_adv($aEntry['text'])), 
+						'id' => $aEntry['id']
+					));
 
 				$oHandler = fopen($sFile, 'w');
 				if($oHandler) {

+ 4 - 1
modules/boonex/organizations/updates/8.0.7_9.0.0/install/installer.php

@@ -21,7 +21,10 @@ class BxOrgsUpdater extends BxDolStudioUpdater
 			if(!file_exists($sFile)) {
 				$aEntries = $this->oDb->getAll('SELECT * FROM `bx_organizations_data`');
 				foreach($aEntries as $aEntry)
-					$this->oDb->query('UPDATE `bx_organizations_data` SET `org_desc`=? WHERE `id`=?', nl2br(htmlspecialchars_adv($aEntry['org_desc'])), $aEntry['id']);
+					$this->oDb->query('UPDATE `bx_organizations_data` SET `org_desc`=:org_desc WHERE `id`=:id', array(
+						'org_desc' => nl2br(htmlspecialchars_adv($aEntry['org_desc'])), 
+						'id' => $aEntry['id']
+					));
 
 				$oHandler = fopen($sFile, 'w');
 				if($oHandler) {

+ 4 - 1
modules/boonex/persons/updates/8.0.7_9.0.0/install/installer.php

@@ -20,7 +20,10 @@ class BxPersonsUpdater extends BxDolStudioUpdater
 			if(!file_exists($sFile)) {
 				$aEntries = $this->oDb->getAll('SELECT * FROM `bx_persons_data`');
 				foreach($aEntries as $aEntry)
-					$this->oDb->query('UPDATE `bx_persons_data` SET `description`=? WHERE `id`=?', nl2br(htmlspecialchars_adv($aEntry['description'])), $aEntry['id']);
+					$this->oDb->query('UPDATE `bx_persons_data` SET `description`=:description WHERE `id`=:id', array(
+						'description' => nl2br(htmlspecialchars_adv($aEntry['description'])), 
+						'id' => $aEntry['id']
+					));
 
 				$oHandler = fopen($sFile, 'w');
 				if($oHandler) {