Permalink
Browse files

Remove odd() from create

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@663 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 1fe2f33 commit a76c555bc10bce2aae7a3d4e3b2d27cff49183d7 jakubvrana committed Jun 11, 2009
Showing with 10 additions and 12 deletions.
  1. +2 −2 _compile.php
  2. +0 −1 functions.js
  3. +6 −9 include/editing.inc.php
  4. +2 −0 todo.txt
View
@@ -175,8 +175,8 @@ function php_shrink($input) {
$file = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file);
}
$replace = 'htmlspecialchars(preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"])) . "?file=\\0&version=' . $VERSION;
-$file = preg_replace('~default\\.css|functions\\.js|favicon\\.ico|(plus|cross)\\.gif~', '<?php echo ' . $replace . '"; ?>', $file);
-$file = preg_replace('~(up|down|arrow)\\.gif~', '" . ' . $replace, $file);
+$file = preg_replace('~default\\.css|functions\\.js|favicon\\.ico~', '<?php echo ' . $replace . '"; ?>', $file);
+$file = preg_replace('~(plus|cross|up|down|arrow)\\.gif~', '" . ' . $replace, $file);
$file = str_replace('error_reporting(E_ALL & ~E_NOTICE);', 'error_reporting(E_ALL & ~E_NOTICE);
if (isset($_GET["file"])) {
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");
View
@@ -118,7 +118,6 @@ function editing_remove_row(button) {
var field = button.form[button.name.replace(/drop_col(.+)/, 'fields$1[field]')];
field.parentNode.removeChild(field);
button.parentNode.parentNode.style.display = 'none';
- //! should change class="odd" of next rows
return true;
}
View
@@ -142,7 +142,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0) {
$i++;
$display = (isset($_POST["add"][$i-1]) || (isset($field["field"]) && !$_POST["drop_col"][$i]));
?>
-<tr<?php echo ($display ? odd() : " style='display: none;'"); ?>>
+<tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
<?php if ($type == "PROCEDURE") { ?><td><select name="fields[<?php echo $i; ?>][inout]"><?php echo optionlist($inout, $field["inout"]); ?></select></td><?php } ?>
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo htmlspecialchars($field["field"]); ?>" maxlength="64" /><?php } ?><input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo htmlspecialchars($field[($_POST ? "orig" : "field")]); ?>" /></th>
<?php edit_type("fields[$i]", $field, $collations); ?>
@@ -152,15 +152,12 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0) {
<td<?php echo ($column_comments ? "" : " class='hidden'"); ?>><input name="fields[<?php echo $i; ?>][comment]" value="<?php echo htmlspecialchars($field["comment"]); ?>" maxlength="255" /></td>
<?php } ?>
<td class="nowrap">
-<input type="image" name="add[<?php echo $i; ?>]" src="plus.gif" alt="+" title="<?php echo lang('Add next'); ?>" onclick="return !editing_add_row(this, <?php echo $allowed; ?>);" />
-<input type="image" name="drop_col[<?php echo $i; ?>]" src="cross.gif" alt="x" title="<?php echo lang('Remove'); ?>" onclick="return !editing_remove_row(this);" />
-<?php
-echo "<input type='image' name='up[$i]' src='up.gif' alt='^' title='" . lang('Move up') . "' />\n";
-echo "<input type='image' name='down[$i]' src='down.gif' alt='v' title='" . lang('Move down') . "' />\n";
-?>
-</td>
-</tr>
<?php
+ echo "<input type='image' name='add[$i]' src='plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editing_add_row(this, $allowed);' />\n";
+ echo "<input type='image' name='drop_col[$i]' src='cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editing_remove_row(this);' />\n";
+ echo "<input type='image' name='up[$i]' src='up.gif' alt='^' title='" . lang('Move up') . "' />\n";
+ echo "<input type='image' name='down[$i]' src='down.gif' alt='v' title='" . lang('Move down') . "' />\n";
+ echo "</td>\n</tr>\n";
}
return $column_comments;
}
View
@@ -8,6 +8,8 @@ Create view and routine options
Visualize SQL queries history
Function to fix database encoding - http://php.vrana.cz/prevod-kodovani-mysql.php
Utilize information_schema.USER_PRIVILEGES in Privileges
+Highlight SQL textarea - may use external CodePress
+Column and table names auto-completition in SQL textarea
? Save token also to cookie - for session expiration and login in other window
? Save uploaded files after error to session variable instead of hidden field
? Aliasing of built-in functions can save 7 KB, substitution of $_GET and friends can save 2 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB, JS packer can save 1 KB

0 comments on commit a76c555

Please sign in to comment.