Skip to content

Commit

Permalink
Fixes #3099 Change ACP's "Credits" module to link to mybb.com page
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMussi committed Apr 15, 2018
1 parent c8d01f1 commit f1c3aed
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 176 deletions.
152 changes: 0 additions & 152 deletions admin/modules/home/credits.php

This file was deleted.

7 changes: 3 additions & 4 deletions admin/modules/home/module_meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function home_meta()
$sub_menu['10'] = array("id" => "dashboard", "title" => $lang->dashboard, "link" => "index.php?module=home-dashboard");
$sub_menu['20'] = array("id" => "preferences", "title" => $lang->preferences, "link" => "index.php?module=home-preferences");
$sub_menu['30'] = array("id" => "docs", "title" => $lang->mybb_documentation, "link" => "https://docs.mybb.com");
$sub_menu['40'] = array("id" => "credits", "title" => $lang->mybb_credits, "link" => "index.php?module=home-credits");
$sub_menu['40'] = array("id" => "credits", "title" => $lang->mybb_credits, "link" => "https://mybb.com/credits");
$sub_menu = $plugins->run_hooks("admin_home_menu", $sub_menu);

$page->add_menu_item($lang->home, "home", "index.php", 1, $sub_menu);
Expand All @@ -46,7 +46,6 @@ function home_action_handler($action)

$actions = array(
'preferences' => array('active' => 'preferences', 'file' => 'preferences.php'),
'credits' => array('active' => 'credits', 'file' => 'credits.php'),
'version_check' => array('active' => 'version_check', 'file' => 'version_check.php'),
'dashboard' => array('active' => 'dashboard', 'file' => 'index.php')
);
Expand Down Expand Up @@ -80,9 +79,9 @@ function home_action_handler($action)
unset($sub_menu[$id]);
}
}

$sub_menu = $plugins->run_hooks("admin_home_menu_quick_access", $sub_menu);

if(!empty($sub_menu))
{
$sidebar = new SidebarItem($lang->quick_access);
Expand Down
7 changes: 1 addition & 6 deletions inc/class_datacache.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function update($name, $contents)
*/
function delete($name, $greedy = false)
{
global $db, $mybb, $cache;
global $db, $mybb, $cache;

// Prepare for database query.
$dbname = $db->escape_string($name);
Expand Down Expand Up @@ -1339,9 +1339,4 @@ function reload_adminnotes()
$query = $db->simple_select("datacache", "title,cache", "title='adminnotes'");
$this->update("adminnotes", unserialize($db->fetch_field($query, "cache")));
}

function reload_mybb_credits()
{
admin_redirect('index.php?module=home-credits&fetch_new=-2');
}
}
14 changes: 0 additions & 14 deletions inc/languages/english/admin/home_credits.lang.php

This file was deleted.

36 changes: 36 additions & 0 deletions install/resources/upgrade43.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/**
* MyBB 1.8
* Copyright 2014 MyBB Group, All Rights Reserved
*
* Website: http://www.mybb.com
* License: http://www.mybb.com/about/license
*
*/

/**
* Upgrade Script: 1.8.15
*/

$upgrade_detail = array(
"revert_all_templates" => 0,
"revert_all_themes" => 0,
"revert_all_settings" => 0
);

@set_time_limit(0);

function upgrade43_dbchanges()
{
global $output, $cache;

$output->print_header("Updating Database");

echo "<p>Performing necessary upgrade queries...</p>";
flush();

$cache->delete("mybb_credits");

$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
$output->print_footer("43_done");
}

0 comments on commit f1c3aed

Please sign in to comment.