Commit 86552cb4 authored by Kjartan's avatar Kjartan

- changed block, module and theme config pages to use checkboxes.

- coding style clean ups.
- fixed taxonomy causing errors.
parent c72bf4b5
......@@ -96,7 +96,7 @@ function request_uri() {
return $REQUEST_URI;
}
else {
return $PATH_INFO . "?" . $QUERY_STRING;
return $PATH_INFO ."?". $QUERY_STRING;
}
}
......@@ -420,7 +420,7 @@ function format_rss_channel($title, $link, $description, $items, $language = "en
$output .= " <description>". htmlentities($description) ."</description>\n";
$output .= " <language>". htmlentities(strip_tags($language)) ."</language>\n";
foreach ($args as $key => $value) {
$output .= "<$key>" . htmlentities(strip_tags($value)) . "</$key>";
$output .= "<$key>". htmlentities(strip_tags($value)) ."</$key>";
}
$output .= $items;
$output .= "</channel>\n";
......@@ -436,7 +436,7 @@ function format_rss_item($title, $link, $description, $args = array()) {
$output .= " <link>". htmlentities(strip_tags($link)) ."</link>\n";
$output .= " <description>". htmlentities($description) ."</description>\n";
foreach ($args as $key => $value) {
$output .= "<$key>" . htmlentities(strip_tags($value)) . "</$key>";
$output .= "<$key>". htmlentities(strip_tags($value)) ."</$key>";
}
$output .= "</item>\n";
......@@ -509,7 +509,7 @@ function page_get_cache() {
function format_interval($timestamp) {
$units = array("year|years" => 31536000, "week|weeks" => 604800, "day|days" => 86400, "hour|hours" => 3600, "min|min" => 60, "sec|sec" => 1);
foreach ($units as $key=>$value) {
foreach ($units as $key => $value) {
$key = explode("|", $key);
if ($timestamp >= $value) {
$output .= ($output ? " " : "") . format_plural(floor($timestamp / $value), $key[0], $key[1]);
......@@ -543,7 +543,7 @@ function format_date($timestamp, $type = "medium", $format = "") {
$date = date($c, $timestamp).$date;
}
else {
$date = $c.$date;
$date = $c . $date;
}
}
break;
......@@ -610,7 +610,7 @@ function form_textarea($title, $name, $value, $cols, $rows, $description = 0) {
function form_select($title, $name, $value, $options, $description = 0, $extra = 0, $multiple = 0) {
if (count($options) > 0) {
foreach ($options as $key=>$choice) {
foreach ($options as $key => $choice) {
$select .= "<option value=\"$key\"". (is_array($value) ? (in_array($key, $value) ? " selected=\"selected\"" : "") : ($key == $value ? " selected=\"selected\"" : "")) .">". check_form($choice) ."</option>";
}
return form_item($title, "<select name=\"edit[$name]". ($multiple ? "[]" : "") ."\"". ($multiple ? " multiple " : "") . ($extra ? " $extra" : "") .">$select</select>", $description);
......
......@@ -146,9 +146,8 @@ function archive_page() {
$edit["day"] = date("d", $date);
}
$start = str_replace("<b>:</b><br />", " ", form_select("", "year", ($edit["year"] ? $edit["year"] : date("Y")), $years) . form_select("", "month", ($edit["month"] ? $edit["month"] : date("m")), $months) . form_select("", "day", ($edit["day"] ? $edit["day"] : date("d")), $days) . form_submit(t("Show")));
$start = str_replace("<p>", "", $start);
$start = str_replace("</p>\n", " ", $start);
$start = form_select("", "year", ($edit["year"] ? $edit["year"] : date("Y")), $years) . form_select("", "month", ($edit["month"] ? $edit["month"] : date("m")), $months) . form_select("", "day", ($edit["day"] ? $edit["day"] : date("d")), $days) . form_submit(t("Show"));
$start = ereg_replace("<[/]?p>", "", $start);
$theme->box(t("Archives"), form($start));
......
......@@ -146,9 +146,8 @@ function archive_page() {
$edit["day"] = date("d", $date);
}
$start = str_replace("<b>:</b><br />", " ", form_select("", "year", ($edit["year"] ? $edit["year"] : date("Y")), $years) . form_select("", "month", ($edit["month"] ? $edit["month"] : date("m")), $months) . form_select("", "day", ($edit["day"] ? $edit["day"] : date("d")), $days) . form_submit(t("Show")));
$start = str_replace("<p>", "", $start);
$start = str_replace("</p>\n", " ", $start);
$start = form_select("", "year", ($edit["year"] ? $edit["year"] : date("Y")), $years) . form_select("", "month", ($edit["month"] ? $edit["month"] : date("m")), $months) . form_select("", "day", ($edit["day"] ? $edit["day"] : date("d")), $days) . form_submit(t("Show"));
$start = ereg_replace("<[/]?p>", "", $start);
$theme->box(t("Archives"), form($start));
......
......@@ -61,7 +61,7 @@ function block_block() {
}
function block_admin_save($edit) {
foreach ($edit as $key=>$value) {
foreach ($edit as $key => $value) {
db_query("UPDATE blocks SET region = '%s', status = '%d', custom = '%d', path = '%s', weight = '%d' WHERE name = '%s'", $value["region"], $value["status"], $value["custom"], $value["path"], $value["weight"], $key);
}
}
......@@ -71,7 +71,7 @@ function block_admin_display() {
// Generate output:
$output = "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= "<tr><th>block</th><th>module</th><th>status</th><th>custom</th><th>weight</th><th>region</th><th>path</th><th colspan=\"2\">operations</th></tr>\n";
$output .= "<tr><th>block</th><th>module</th><th>enabled</th><th>custom</th><th>weight</th><th>region</th><th>path</th><th colspan=\"2\">operations</th></tr>\n";
while ($block = db_fetch_object($result)) {
$weights = array(0 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
......@@ -80,8 +80,8 @@ function block_admin_display() {
//$output .= '<td>'. la($block->name, array("mod" => "block", "op" => "view", "id" => $block->delta), t("View the block details")) .'</td>';
$output .= "<td>$block->name</td>";
$output .= '<td>'. (module_hook($block->module, "admin") ? la($block->module, array("mod" => $block->module), "Administer module") : $block->module) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][status", $block->status, array("disabled", "enabled")) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][custom", $block->custom, array("disabled", "enabled")) .'</td>';
$output .= '<td align="center">'. form_checkbox(NULL, "$block->name][status", 1, $block->status) .'</td>';
$output .= '<td align="center">'. form_checkbox(NULL, "$block->name][custom", 1, $block->custom) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][weight", $block->weight, $weights) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][region", $block->region, array("left", "right")) .'</td>';
$output .= '<td>'. form_textfield(NULL, "$block->name][path", $block->path, 10, 255) .'</td>';
......
......@@ -61,7 +61,7 @@ function block_block() {
}
function block_admin_save($edit) {
foreach ($edit as $key=>$value) {
foreach ($edit as $key => $value) {
db_query("UPDATE blocks SET region = '%s', status = '%d', custom = '%d', path = '%s', weight = '%d' WHERE name = '%s'", $value["region"], $value["status"], $value["custom"], $value["path"], $value["weight"], $key);
}
}
......@@ -71,7 +71,7 @@ function block_admin_display() {
// Generate output:
$output = "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= "<tr><th>block</th><th>module</th><th>status</th><th>custom</th><th>weight</th><th>region</th><th>path</th><th colspan=\"2\">operations</th></tr>\n";
$output .= "<tr><th>block</th><th>module</th><th>enabled</th><th>custom</th><th>weight</th><th>region</th><th>path</th><th colspan=\"2\">operations</th></tr>\n";
while ($block = db_fetch_object($result)) {
$weights = array(0 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
......@@ -80,8 +80,8 @@ function block_admin_display() {
//$output .= '<td>'. la($block->name, array("mod" => "block", "op" => "view", "id" => $block->delta), t("View the block details")) .'</td>';
$output .= "<td>$block->name</td>";
$output .= '<td>'. (module_hook($block->module, "admin") ? la($block->module, array("mod" => $block->module), "Administer module") : $block->module) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][status", $block->status, array("disabled", "enabled")) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][custom", $block->custom, array("disabled", "enabled")) .'</td>';
$output .= '<td align="center">'. form_checkbox(NULL, "$block->name][status", 1, $block->status) .'</td>';
$output .= '<td align="center">'. form_checkbox(NULL, "$block->name][custom", 1, $block->custom) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][weight", $block->weight, $weights) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][region", $block->region, array("left", "right")) .'</td>';
$output .= '<td>'. form_textfield(NULL, "$block->name][path", $block->path, 10, 255) .'</td>';
......
......@@ -416,7 +416,7 @@ function node_admin_settings($edit = array()) {
** Reset the configuration options to their default value:
*/
foreach ($edit as $name=>$value) {
foreach ($edit as $name => $value) {
variable_del($name);
}
}
......@@ -460,7 +460,7 @@ function node_admin_edit($node) {
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr><th>older revisions</th><th colspan=\"3\">operations</th></tr>";
foreach ($node->revisions as $key => $revision) {
$output .= " <tr><td>". t("revision #%r revised by %u on %d", array("%r" => $key, "%u" => format_name(user_load(array("uid" => $revision["uid"]))), "%d" => format_date($revision["timestamp"], "small"))) . ($revision["history"] ? "<br /><small>". $revision["history"] ."</small>" : "") ."</td><td>". l(t("view revision"), array("id" => $node->nid, "revision" =>$key)) ."</td><td>". la(t("rollback revision"), array("mod" => "node", "op" => "rollback+revision", "id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("delete revision"), array("mod" => "node", "op" => "delete+revision", "id" => $node->nid, "revision" => $key)) ."</td></tr>";
$output .= " <tr><td>". t("revision #%r revised by %u on %d", array("%r" => $key, "%u" => format_name(user_load(array("uid" => $revision["uid"]))), "%d" => format_date($revision["timestamp"], "small"))) . ($revision["history"] ? "<br /><small>". $revision["history"] ."</small>" : "") ."</td><td>". l(t("view revision"), array("id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("rollback revision"), array("mod" => "node", "op" => "rollback+revision", "id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("delete revision"), array("mod" => "node", "op" => "delete+revision", "id" => $node->nid, "revision" => $key)) ."</td></tr>";
}
$output .= "</table>";
}
......@@ -1031,7 +1031,9 @@ function node_submit($node) {
** Update terms of the node
*/
taxonomy_node_save($nid, $node->taxonomy);
if (function_exists("taxonomy_node_save")) {
taxonomy_node_save($nid, $node->taxonomy);
}
watchdog("special", "$node->type: updated '$node->title'");
$output = t("The node has been updated.");
......@@ -1076,7 +1078,9 @@ function node_submit($node) {
** Insert terms of the node
*/
taxonomy_node_save($nid, $node->taxonomy);
if (function_exists("taxonomy_node_save")) {
taxonomy_node_save($nid, $node->taxonomy);
}
watchdog("special", "$node->type: added '$node->title'");
$output = t("Thanks for your submission.");
......@@ -1138,7 +1142,9 @@ function node_delete($edit) {
** Delete any taxonomy terms
*/
taxonomy_node_delete($node->nid);
if (function_exists("taxonomy_node_delete")) {
taxonomy_node_delete($nid, $node->taxonomy);
}
/*
** Call the node specific callback (if any):
......
......@@ -416,7 +416,7 @@ function node_admin_settings($edit = array()) {
** Reset the configuration options to their default value:
*/
foreach ($edit as $name=>$value) {
foreach ($edit as $name => $value) {
variable_del($name);
}
}
......@@ -460,7 +460,7 @@ function node_admin_edit($node) {
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr><th>older revisions</th><th colspan=\"3\">operations</th></tr>";
foreach ($node->revisions as $key => $revision) {
$output .= " <tr><td>". t("revision #%r revised by %u on %d", array("%r" => $key, "%u" => format_name(user_load(array("uid" => $revision["uid"]))), "%d" => format_date($revision["timestamp"], "small"))) . ($revision["history"] ? "<br /><small>". $revision["history"] ."</small>" : "") ."</td><td>". l(t("view revision"), array("id" => $node->nid, "revision" =>$key)) ."</td><td>". la(t("rollback revision"), array("mod" => "node", "op" => "rollback+revision", "id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("delete revision"), array("mod" => "node", "op" => "delete+revision", "id" => $node->nid, "revision" => $key)) ."</td></tr>";
$output .= " <tr><td>". t("revision #%r revised by %u on %d", array("%r" => $key, "%u" => format_name(user_load(array("uid" => $revision["uid"]))), "%d" => format_date($revision["timestamp"], "small"))) . ($revision["history"] ? "<br /><small>". $revision["history"] ."</small>" : "") ."</td><td>". l(t("view revision"), array("id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("rollback revision"), array("mod" => "node", "op" => "rollback+revision", "id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("delete revision"), array("mod" => "node", "op" => "delete+revision", "id" => $node->nid, "revision" => $key)) ."</td></tr>";
}
$output .= "</table>";
}
......@@ -1031,7 +1031,9 @@ function node_submit($node) {
** Update terms of the node
*/
taxonomy_node_save($nid, $node->taxonomy);
if (function_exists("taxonomy_node_save")) {
taxonomy_node_save($nid, $node->taxonomy);
}
watchdog("special", "$node->type: updated '$node->title'");
$output = t("The node has been updated.");
......@@ -1076,7 +1078,9 @@ function node_submit($node) {
** Insert terms of the node
*/
taxonomy_node_save($nid, $node->taxonomy);
if (function_exists("taxonomy_node_save")) {
taxonomy_node_save($nid, $node->taxonomy);
}
watchdog("special", "$node->type: added '$node->title'");
$output = t("Thanks for your submission.");
......@@ -1138,7 +1142,9 @@ function node_delete($edit) {
** Delete any taxonomy terms
*/
taxonomy_node_delete($node->nid);
if (function_exists("taxonomy_node_delete")) {
taxonomy_node_delete($nid, $node->taxonomy);
}
/*
** Call the node specific callback (if any):
......
......@@ -78,7 +78,7 @@ function system_view_options() {
// layout settings:
$output .= "<h3>Layout settings</h3>\n";
foreach (theme_list() as $key=>$value) $options .= "<option value=\"$key\"". (variable_get("theme_default", 0) == $key ? " selected=\"selected\"" : "") .">$key</option>\n";
foreach (theme_list() as $key => $value) $options .= "<option value=\"$key\"". (variable_get("theme_default", 0) == $key ? " selected=\"selected\"" : "") .">$key</option>\n";
$output .= form_item("Default theme", "<select name=\"edit[theme_default]\">$options</select>", "The default theme as seen by visitors or anonymous users.");
$output .= "<hr />\n";
......@@ -107,12 +107,12 @@ function system_view_filters() {
}
function system_save($edit = array()) {
foreach ($edit as $name=>$value) variable_set($name, $value);
foreach ($edit as $name => $value) variable_set($name, $value);
return "the configuration options have been saved.";
}
function system_default($edit = array()) {
foreach ($edit as $name=>$value) variable_del($name);
foreach ($edit as $name => $value) variable_del($name);
return "the configuration options have been reset to their default values.";
}
......@@ -163,9 +163,15 @@ function system_modules() {
$required = array("user", "drupal", "system", "watchdog");
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><th>module</th><th>description</th><th>status</th><th colspan=\"2\">operations</th></tr>\n";
$output .= "<tr><th>module</th><th>description</th><th>enabled</th><th colspan=\"2\">operations</th></tr>\n";
foreach ($modules as $name => $module) {
$output .= " <tr><td>$name</td><td>". check_output(module_invoke($name, "system", "description")) ."</td><td>". (in_array($name, $required) ? "Enabled" : form_select("", "status][$name", $module["status"], array(t("Disabled"), t("Enabled")))) ."</td><td>". (module_hook($name, "page") ? lm(t("view"), array("mod" => $name)) : "&nbsp;") ."</td><td>". (module_hook($name, "admin") ? la(t("admin"), array("mod" => $name)) : "&nbsp;") ."</td></tr>\n";
$output .= "<tr>";
$output .= "<td>$name</td>";
$output .= "<td>". check_output(module_invoke($name, "system", "description")) ."</td>";
$output .= "<td align=\"center\">". (in_array($name, $required) ? "Enabled" : form_checkbox("", "status][$name", 1, $module["status"])) ."</td>";
$output .= "<td>". (module_hook($name, "page") ? lm(t("view"), array("mod" => $name)) : "&nbsp;") ."</td>";
$output .= "<td>". (module_hook($name, "admin") ? la(t("admin"), array("mod" => $name)) : "&nbsp;") ."</td>";
$output .= "</tr>\n";
if (!in_array($name, $required)) {
db_query("INSERT INTO system SET name = '$name', type = 'module', filename = '$module[filename]', status = '$module[status]'");
}
......@@ -229,9 +235,15 @@ function system_themes() {
db_query("DELETE FROM system WHERE type = 'theme'");
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><th>theme</th><th>name</th><th>description</th><th>author</th><th>status</th></tr>\n";
$output .= "<tr><th>theme</th><th>name</th><th>description</th><th>author</th><th>enabled</th></tr>\n";
foreach ($themes as $name => $theme) {
$output .= " <tr><td>$name</td><td>$theme->displayname</td><td>". form_textfield("", "$name][description", $theme->description, 40, 255)."</td><td>$theme->author</td><td>". form_select("", "$name][status", $theme->status, array(t("Disabled"), t("Enabled"))) ."</td></tr>\n";
$output .= "<tr>";
$output .= "<td>$name</td>";
$output .= "<td>$theme->displayname</td>";
$output .= "<td>". form_textfield("", "$name][description", $theme->description, 40, 255)."</td>";
$output .= "<td>$theme->author</td>";
$output .= "<td align=\"center\">". form_checkbox("", "$name][status", 1, $theme->status) ."</td>";
$output .= "</tr>\n";
db_query("INSERT INTO system SET name = '$name', type = 'theme', filename = '$theme->filename', status = '$theme->status', description = '$theme->description'");
}
$output .= "</table><br />\n";
......
......@@ -78,7 +78,7 @@ function system_view_options() {
// layout settings:
$output .= "<h3>Layout settings</h3>\n";
foreach (theme_list() as $key=>$value) $options .= "<option value=\"$key\"". (variable_get("theme_default", 0) == $key ? " selected=\"selected\"" : "") .">$key</option>\n";
foreach (theme_list() as $key => $value) $options .= "<option value=\"$key\"". (variable_get("theme_default", 0) == $key ? " selected=\"selected\"" : "") .">$key</option>\n";
$output .= form_item("Default theme", "<select name=\"edit[theme_default]\">$options</select>", "The default theme as seen by visitors or anonymous users.");
$output .= "<hr />\n";
......@@ -107,12 +107,12 @@ function system_view_filters() {
}
function system_save($edit = array()) {
foreach ($edit as $name=>$value) variable_set($name, $value);
foreach ($edit as $name => $value) variable_set($name, $value);
return "the configuration options have been saved.";
}
function system_default($edit = array()) {
foreach ($edit as $name=>$value) variable_del($name);
foreach ($edit as $name => $value) variable_del($name);
return "the configuration options have been reset to their default values.";
}
......@@ -163,9 +163,15 @@ function system_modules() {
$required = array("user", "drupal", "system", "watchdog");
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><th>module</th><th>description</th><th>status</th><th colspan=\"2\">operations</th></tr>\n";
$output .= "<tr><th>module</th><th>description</th><th>enabled</th><th colspan=\"2\">operations</th></tr>\n";
foreach ($modules as $name => $module) {
$output .= " <tr><td>$name</td><td>". check_output(module_invoke($name, "system", "description")) ."</td><td>". (in_array($name, $required) ? "Enabled" : form_select("", "status][$name", $module["status"], array(t("Disabled"), t("Enabled")))) ."</td><td>". (module_hook($name, "page") ? lm(t("view"), array("mod" => $name)) : "&nbsp;") ."</td><td>". (module_hook($name, "admin") ? la(t("admin"), array("mod" => $name)) : "&nbsp;") ."</td></tr>\n";
$output .= "<tr>";
$output .= "<td>$name</td>";
$output .= "<td>". check_output(module_invoke($name, "system", "description")) ."</td>";
$output .= "<td align=\"center\">". (in_array($name, $required) ? "Enabled" : form_checkbox("", "status][$name", 1, $module["status"])) ."</td>";
$output .= "<td>". (module_hook($name, "page") ? lm(t("view"), array("mod" => $name)) : "&nbsp;") ."</td>";
$output .= "<td>". (module_hook($name, "admin") ? la(t("admin"), array("mod" => $name)) : "&nbsp;") ."</td>";
$output .= "</tr>\n";
if (!in_array($name, $required)) {
db_query("INSERT INTO system SET name = '$name', type = 'module', filename = '$module[filename]', status = '$module[status]'");
}
......@@ -229,9 +235,15 @@ function system_themes() {
db_query("DELETE FROM system WHERE type = 'theme'");
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><th>theme</th><th>name</th><th>description</th><th>author</th><th>status</th></tr>\n";
$output .= "<tr><th>theme</th><th>name</th><th>description</th><th>author</th><th>enabled</th></tr>\n";
foreach ($themes as $name => $theme) {
$output .= " <tr><td>$name</td><td>$theme->displayname</td><td>". form_textfield("", "$name][description", $theme->description, 40, 255)."</td><td>$theme->author</td><td>". form_select("", "$name][status", $theme->status, array(t("Disabled"), t("Enabled"))) ."</td></tr>\n";
$output .= "<tr>";
$output .= "<td>$name</td>";
$output .= "<td>$theme->displayname</td>";
$output .= "<td>". form_textfield("", "$name][description", $theme->description, 40, 255)."</td>";
$output .= "<td>$theme->author</td>";
$output .= "<td align=\"center\">". form_checkbox("", "$name][status", 1, $theme->status) ."</td>";
$output .= "</tr>\n";
db_query("INSERT INTO system SET name = '$name', type = 'theme', filename = '$theme->filename', status = '$theme->status', description = '$theme->description'");
}
$output .= "</table><br />\n";
......
......@@ -403,6 +403,7 @@ function update_26() {
update_sql("ALTER TABLE term_synonym ADD INDEX (name(3));");
update_sql("ALTER TABLE term_node ADD INDEX (nid);");
update_sql("ALTER TABLE term_node ADD INDEX (tid);");
update_sql("UPDATE node SET comment = 2 WHERE comment = 1");
}
function update_27() {
......@@ -456,7 +457,7 @@ function update_sql($sql) {
function update_data($start) {
global $mysql_updates;
$mysql_updates = array_slice($mysql_updates, ($start-- ? $start : 0));
foreach ($mysql_updates as $date=>$func) {
foreach ($mysql_updates as $date => $func) {
print "<b>$date</b><br />\n<pre>\n";
$func();
variable_set("update_start", $date);
......@@ -481,7 +482,7 @@ function update_page() {
$start = variable_get("update_start", 0);
$dates[] = "All";
$i = 1;
foreach ($mysql_updates as $date=>$sql) {
foreach ($mysql_updates as $date => $sql) {
$dates[$i++] = $date;
if ($date == $start) {
$selected = $i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment