mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
More updates, getting closer
This commit is contained in:
34
e107_plugins/forum/forum_management.php
Executable file
34
e107_plugins/forum/forum_management.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
class forum_management
|
||||
{
|
||||
function forum_install_pre(&$var)
|
||||
{
|
||||
print_a($var);
|
||||
echo "custom install 'pre' function<br /><br />";
|
||||
}
|
||||
|
||||
function forum_install_post(&$var)
|
||||
{
|
||||
global $sql;
|
||||
echo "Setting all user_forums to 0 <br />";
|
||||
$sql -> db_Update("user", "user_forums='0'");
|
||||
}
|
||||
|
||||
function forum_uninstatll(&$var)
|
||||
{
|
||||
global $sql;
|
||||
$sql -> db_Update("user", "user_forums='0'");
|
||||
}
|
||||
|
||||
function forum_upgrade(&$var)
|
||||
{
|
||||
global $sql;
|
||||
if(version_compare($var['current_plug']['plugin_version'], "1.2", "<"))
|
||||
{
|
||||
$qry = "ALTER TABLE #forum ADD forum_postclass TINYINT( 3 ) UNSIGNED DEFAULT '0' NOT NULL ;"
|
||||
$sql->db_Select_gen($qry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,6 @@
|
||||
<userclass name="forum_moderator" description="Moderator of all forums" />
|
||||
</userclasses>
|
||||
<management>
|
||||
<install when="pre" type="classFunction" file="forum_management.php" class="forum_management" function="forum_install_pre" />
|
||||
<install when="post" type="classFunction" file="forum_management.php" class="forum_management" function="forum_install_post" />
|
||||
<uninstall type="classFunction" file="forum_management.php" class="forum_management" function="forum_uninstall" />
|
||||
<upgrade type="classFunction" file="forum_management.php" class="forum_management" function="forum_upgrade" />
|
||||
|
Reference in New Issue
Block a user