echo '<li>' . $table . '.' . $field . '</li>'; } } echo '</ul>'; echo '</li>'; echo '<li>Adds a Editor user role and assoiates every user who does not have a role to the new role</li>'; echo '<li>Adds Flash Video as an option to av.media_format</li>'; echo '</ul>'; echo_form(); } if (isset($_POST['verify'])) { $test_mode = true; if (!empty($_POST['run']) && $_POST['run'] == 'Run') { $test_mode = false; } run_updates($test_mode); } function echo_form() { echo '<form name="doit" method="post" action="' . get_current_url() . '" />'; echo '<input type="submit" name="run" value="Run" />'; echo '<input type="submit" name="test" value="Test" />'; echo '<input type="hidden" name="verify" value="true" />'; echo '</form>'; } function run_updates($test_mode = true) { $updates = array('update_theme_content_manager', 'add_new_themes', 'change_event_last_occurence_to_date', 'add_indexes_b3_to_b4', 'add_editor_user_role', 'add_flash_video_media_type'); if ($test_mode) { echo '<h2>Testing</h2>'; }
$text .= "<td>" . LAN_UPDATE_3 . "</td>"; } else { $updates++; $mes->addDebug($reason); $text .= "<td>" . $frm->admin_button('update[' . $func . ']', LAN_UPDATE, 'update') . "</td>"; } $text .= "</tr>\n"; } } $text .= "\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</fieldset>\n\t</form>\n\t\t"; echo $text; return $updates; // Number of updates to do } if (is_array($_POST['update_core'])) { $message = run_updates($dbupdate); } if (is_array($_POST['update'])) { $func = key($_POST['update']); run_updates_plugin($func, FALSE); } $total_updates = 0; ob_start(); if (isset($dbupdatep)) { // Show plugin updates done $total_updates += show_updates($dbupdatep, 'plugin'); } // Show core updates done $total_updates += show_updates($dbupdate, 'core'); $text = ob_get_contents(); ob_end_clean();