$admin->table_start();
$admin->table_head(_('Automations'));
- $actions = $db->query("SELECT * FROM " . TABLE_PREFIX . "autoaction ORDER BY name ASC");
+ $actions = $db->query("SELECT * FROM " . TABLE_PREFIX . "automation ORDER BY name ASC");
while ($action = $db->fetch_array($actions))
{
$admin->row_text($action['name'] . "\n<div class=\"smallfont\">$action[description]</div>", "<a href=\"automation.php?do=edit&actionid=$action[actionid]\">[" . _('Edit') . "]</a> <a href=\"automation.php?do=delete&actionid=$action[actionid]\">[" . _('Delete') . "]</a>");
echo '<p>Permissions cached</p>';
-build_auto_actions();
+build_automations();
echo '<p>Auto actions cached</p>';
$fields["$field[fieldid]"] = $field;
}
- if (is_array($bugsys->datastore['autoaction']))
+ if (is_array($bugsys->datastore['automation']))
{
- foreach ($bugsys->datastore['autoaction'] AS $autoaction)
+ foreach ($bugsys->datastore['automation'] AS $automation)
{
- $autoaction['fieldchanges'] = unserialize($autoaction['fieldchanges']);
+ $automation['fieldchanges'] = unserialize($automation['fieldchanges']);
- $left = $autoaction['name'];
- $right = $autoaction['description'];
+ $left = $automation['name'];
+ $right = $automation['description'];
$trextra = ' class="listinghead"';
- eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
+ eval('$automations .= "' . $template->fetch('explain_row') . '";');
- if ($autoaction['comment'])
+ if ($automation['comment'])
{
$left = _('Add Comment');
- $right = $autoaction['comment'];
+ $right = $automation['comment'];
$trextra = ' style="background-color: ' . $stylevar['alt_color'] . '"';
- eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
+ eval('$automations .= "' . $template->fetch('explain_row') . '";');
}
$trextra = '';
- if (is_array($autoaction['fieldchanges']['builtin']))
+ if (is_array($automation['fieldchanges']['builtin']))
{
- foreach ($autoaction['fieldchanges']['builtin'] AS $name => $value)
+ foreach ($automation['fieldchanges']['builtin'] AS $name => $value)
{
$left = $name;
$right = $bugsys->datastore["$left"]["$value"]["$left"];
- eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
+ eval('$automations .= "' . $template->fetch('explain_row') . '";');
}
}
- if (is_array($autoaction['fieldchanges']['custom']))
+ if (is_array($automation['fieldchanges']['custom']))
{
- foreach ($autoaction['fieldchanges']['custom'] AS $id => $value)
+ foreach ($automation['fieldchanges']['custom'] AS $id => $value)
{
if (!$fields["$id"])
{
$left = $fields["$id"]['name'] . ' ' . sprintf(_('(Custom #%1$d, type: %2$s)'), $id, $fields["$id"]['type']);
$right = $value;
- eval('$autoactions .= "' . $template->fetch('explain_row') . '";');
+ eval('$automations .= "' . $template->fetch('explain_row') . '";');
}
}
}
* @var string
* @access private
*/
- var $table = 'autoaction';
+ var $table = 'automation';
/**
* Table prefix
*/
function post_insert()
{
- build_auto_actions();
+ build_automations();
}
// ###################################################################
*/
function post_update()
{
- build_auto_actions();
+ build_automations();
}
// ###################################################################
*/
function post_delete()
{
- build_auto_actions();
+ build_automations();
}
// ###################################################################
$bugsys->datastore['permission'] = $tempstore;
}
-// ##################### Start build_auto_actions ####################
-function build_auto_actions()
+// ##################### Start build_automations ####################
+function build_automations()
{
global $bugsys;
- $autoactions = $bugsys->db->query("SELECT * FROM " . TABLE_PREFIX . "autoaction ORDER BY name ASC");
- while ($autoaction = $bugsys->db->fetch_array($autoactions))
+ $automations = $bugsys->db->query("SELECT * FROM " . TABLE_PREFIX . "automation ORDER BY name ASC");
+ while ($automation = $bugsys->db->fetch_array($automations))
{
- $actions["$autoaction[actionid]"] = $autoaction;
+ $actions["$automation[actionid]"] = $automation;
}
$bugsys->db->query("
- ### replacing auto action cache ###
+ ### replacing automation cache ###
REPLACE INTO " . TABLE_PREFIX . "datastore (title, data)
- VALUES ('autoaction', '" . $bugsys->escape(serialize($actions)) . "')"
+ VALUES ('automation', '" . $bugsys->escape(serialize($actions)) . "')"
);
- $bugsys->datastore['autoaction'] = $actions;
+ $bugsys->datastore['automation'] = $actions;
}
// ###################### Start build_user_help ######################
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ###################################################################
+|| # Bugdar [#]version[#]
+|| # Copyright ©2002-[#]year[#] Blue Static
+|| #
+|| # This program is free software; you can redistribute it and/or modify
+|| # it under the terms of the GNU General Public License as published by
+|| # the Free Software Foundation; version [#]gpl[#] of the License.
+|| #
+|| # This program is distributed in the hope that it will be useful, but
+|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+|| # more details.
+|| #
+|| # You should have received a copy of the GNU General Public License along
+|| # with this program; if not, write to the Free Software Foundation, Inc.,
+|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+|| ###################################################################
+\*=====================================================================*/
+
+define('STOP_MARK', 2);
+define('ACTIVE_SITE', 'upgrade5.php');
+
+require_once('./global.php');
+require_once('./includes/functions_datastore.php');
+
+page_start();
+
+// ###################################################################
+
+if ($bugsys->in['mark'] == 0)
+{
+?>
+<h1>Welcome to Bugdar</h1>
+
+<p>This upgrade will take from Bugdar 1.1.0 Release Candidate 1 to Bugdar 1.1.0 (final).</p>
+
+<p>Not much has to be done, we just have a quick rename and version number change.</p>
+
+<p>To begin the process, please click the button below.</p>
+<?php
+}
+
+// ###################################################################
+
+if ($bugsys->in['mark'] == 1)
+{
+?>
+ <h1>Rename Automatic Actions</h1>
+
+ <p>Simply for aesthetic's sake, we've ranamed "Automatic Actions" to "Automations." This does all the necessary database changes to make that rename work internally.</p>
+<?php
+
+ $db->query("ALTER TABLE " . TABLE_PREFIX . "autoaction RENAME " . TABLE_PREFIX . "automation");
+ echo "Renaming datbase table<br />\n";
+
+ $db->query("DELETE FROM " . TABLE_PREFIX . "datastore WHERE title = 'autoaction'");
+ echo "Clearing old datastore information<br />\n";
+
+ build_automations();
+ echo "Rebuilding the automations cahce<br />\n";
+}
+
+// ###################################################################
+
+if ($bugsys->in['mark'] == 2)
+{
+?>
+<h1>Version Number Change</h1>
+
+<p>This step finishes the upgrade by inreasing your version number.</p>
+
+<?php
+
+ require_once('./includes/settings.php');
+
+ $db->query("UPDATE " . TABLE_PREFIX . "setting SET value = '1.1.0' WHERE varname = 'trackerversion'");
+
+ build_settings();
+
+?>
+
+... done.
+
+<?php
+}
+
+// ###################################################################
+
+page_end();
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file
<h2>{@"Explication of Automations"}</h2>
<table border="$stylevar[border]" cellspacing="$stylevar[spacing]" cellpadding="$stylevar[padding]px" width="$stylevar[normal_width]">
-$autoactions
+$automations
</table>
$footer
\ No newline at end of file