mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
Collapse the five 0/1-based index flags into one option.
This commit is contained in:
@@ -105,7 +105,7 @@ Blockly.PHP['lists_indexOf'] = function(block) {
|
||||
Blockly.PHP.ORDER_NONE) || '\'\'';
|
||||
var argument1 = Blockly.PHP.valueToCode(block, 'VALUE',
|
||||
Blockly.PHP.ORDER_MEMBER) || '[]';
|
||||
if (Blockly.PHP.ONE_BASED_INDEXING) {
|
||||
if (block.workspace.options.oneBasedIndex) {
|
||||
var errorIndex = ' 0';
|
||||
var indexAdjustment = ' + 1';
|
||||
} else {
|
||||
|
||||
@@ -102,7 +102,7 @@ Blockly.PHP['text_indexOf'] = function(block) {
|
||||
Blockly.PHP.ORDER_NONE) || '\'\'';
|
||||
var text = Blockly.PHP.valueToCode(block, 'VALUE',
|
||||
Blockly.PHP.ORDER_NONE) || '\'\'';
|
||||
if (Blockly.PHP.ONE_BASED_INDEXING) {
|
||||
if (block.workspace.options.oneBasedIndex) {
|
||||
var errorIndex = ' 0';
|
||||
var indexAdjustment = ' + 1';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user