@@ -70,9 +70,9 @@ public function fetchSuggestionTypes()
70
70
public function createTable (){
71
71
return Symphony::Database ()->query (
72
72
"CREATE TABLE IF NOT EXISTS `tbl_entries_data_ " . $ this ->get ('id ' ) . "` (
73
- `id` int (11) unsigned NOT NULL auto_increment ,
74
- `entry_id` int (11) unsigned NOT NULL,
75
- `relation_id` int (11) unsigned DEFAULT NULL,
73
+ `id` INT (11) UNSIGNED NOT NULL AUTO_INCREMENT ,
74
+ `entry_id` INT (11) UNSIGNED NOT NULL,
75
+ `relation_id` INT (11) UNSIGNED DEFAULT NULL,
76
76
PRIMARY KEY (`id`),
77
77
KEY `entry_id` (`entry_id`),
78
78
KEY `relation_id` (`relation_id`)
@@ -91,7 +91,7 @@ public function set($field, $value){
91
91
$ this ->_settings [$ field ] = $ value ;
92
92
}
93
93
94
- public function findOptions (array $ existing_selection= NULL , $ entry_id= NULL ){
94
+ public function findOptions (array $ existing_selection = null , $ entry_id = null ){
95
95
$ values = array ();
96
96
$ limit = $ this ->get ('limit ' );
97
97
@@ -116,7 +116,7 @@ public function findOptions(array $existing_selection=NULL,$entry_id=NULL){
116
116
);
117
117
118
118
EntryManager::setFetchSorting ($ section ->getSortingField (), $ section ->getSortingOrder ());
119
- $ entries = EntryManager::fetch (NULL , $ section ->get ('id ' ), $ limit , 0 , null , null , false , false );
119
+ $ entries = EntryManager::fetch (null , $ section ->get ('id ' ), $ limit , 0 , null , null , false , false );
120
120
121
121
$ results = array ();
122
122
foreach ($ entries as $ entry ) {
@@ -157,7 +157,7 @@ public function getToggleStates(){
157
157
return $ output ;
158
158
}
159
159
160
- public function toggleFieldData (array $ data , $ newState , $ entry_id= null ){
160
+ public function toggleFieldData (array $ data , $ newState , $ entry_id = null ){
161
161
$ data ['relation_id ' ] = $ newState ;
162
162
return $ data ;
163
163
}
@@ -182,7 +182,7 @@ public function fetchAssociatedEntryIDs($value){
182
182
));
183
183
}
184
184
185
- public function fetchAssociatedEntrySearchValue ($ data , $ field_id= NULL , $ parent_entry_id= NULL ){
185
+ public function fetchAssociatedEntrySearchValue ($ data , $ field_id = null , $ parent_entry_id = null ){
186
186
// We dont care about $data, but instead $parent_entry_id
187
187
if (!is_null ($ parent_entry_id )) return $ parent_entry_id ;
188
188
@@ -442,7 +442,7 @@ public function displaySettingsPanel(XMLElement &$wrapper, $errors = null){
442
442
$ wrapper ->appendChild ($ label );
443
443
444
444
// Options
445
- $ div = new XMLElement ('div ' , NULL , array ('class ' => 'two columns ' ));
445
+ $ div = new XMLElement ('div ' , null , array ('class ' => 'two columns ' ));
446
446
$ wrapper ->appendChild ($ div );
447
447
448
448
// Allow selection of multiple items
@@ -477,7 +477,7 @@ public function displaySettingsPanel(XMLElement &$wrapper, $errors = null){
477
477
}
478
478
479
479
public function checkPostFieldData ($ data , &$ message , $ entry_id = null ){
480
- $ message = NULL ;
480
+ $ message = null ;
481
481
482
482
if (is_array ($ data )) {
483
483
$ data = isset ($ data ['relation_id ' ])
@@ -524,7 +524,7 @@ public function commit(){
524
524
525
525
SectionManager::removeSectionAssociation ($ id );
526
526
foreach ($ this ->get ('related_field_id ' ) as $ field_id ){
527
- SectionManager::createSectionAssociation (NULL , $ id , $ field_id , $ this ->get ('show_association ' ) == 'yes ' ? true : false );
527
+ SectionManager::createSectionAssociation (null , $ id , $ field_id , $ this ->get ('show_association ' ) == 'yes ' ? true : false );
528
528
}
529
529
530
530
return true ;
@@ -537,7 +537,7 @@ public function commit(){
537
537
public function displayPublishPanel (XMLElement &$ wrapper , $ data = null , $ flagWithError = null , $ fieldnamePrefix = null , $ fieldnamePostfix = null , $ entry_id = null ) {
538
538
$ entry_ids = array ();
539
539
$ options = array (
540
- array (NULL , false , NULL )
540
+ array (null , false , null )
541
541
);
542
542
543
543
if (!is_null ($ data ['relation_id ' ])){
@@ -578,7 +578,7 @@ public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWit
578
578
if ($ this ->get ('required ' ) != 'yes ' ) $ label ->appendChild (new XMLElement ('i ' , __ ('Optional ' )));
579
579
$ label ->appendChild (
580
580
Widget::Select ($ fieldname , $ options , ($ this ->get ('allow_multiple_selection ' ) == 'yes ' ? array (
581
- 'multiple ' => 'multiple ' ) : NULL
581
+ 'multiple ' => 'multiple ' ) : null
582
582
))
583
583
);
584
584
@@ -588,7 +588,7 @@ public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWit
588
588
else $ wrapper ->appendChild ($ label );
589
589
}
590
590
591
- public function processRawFieldData ($ data , &$ status , &$ message= null , $ simulate= false , $ entry_id= null ) {
591
+ public function processRawFieldData ($ data , &$ status , &$ message = null , $ simulate = false , $ entry_id = null ) {
592
592
$ status = self ::__OK__ ;
593
593
$ result = array ();
594
594
@@ -636,7 +636,7 @@ public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = fa
636
636
$ wrapper ->appendChild ($ list );
637
637
}
638
638
639
- public function getParameterPoolValue (array $ data , $ entry_id= NULL ){
639
+ public function getParameterPoolValue (array $ data , $ entry_id = null ){
640
640
return $ this ->prepareExportValue ($ data , ExportableField::LIST_OF + ExportableField::ENTRY , $ entry_id );
641
641
}
642
642
@@ -850,7 +850,7 @@ public function fetchFilterableOperators()
850
850
);
851
851
}
852
852
853
- public function buildDSRetrievalSQL ($ data , &$ joins , &$ where , $ andOperation= false ){
853
+ public function buildDSRetrievalSQL ($ data , &$ joins , &$ where , $ andOperation = false ){
854
854
$ field_id = $ this ->get ('id ' );
855
855
856
856
if (preg_match ('/^sql:\s*/ ' , $ data [0 ], $ matches )) {
@@ -962,7 +962,7 @@ private function getRelatedFieldsId() {
962
962
return explode (', ' , $ related_field_id );
963
963
}
964
964
965
- public function buildSortingSQL (&$ joins , &$ where , &$ sort , $ order= 'ASC ' ){
965
+ public function buildSortingSQL (&$ joins , &$ where , &$ sort , $ order = 'ASC ' ){
966
966
if (in_array (strtolower ($ order ), array ('random ' , 'rand ' ))) {
967
967
$ sort = 'ORDER BY RAND() ' ;
968
968
}
0 commit comments