Phase 3: Update remaining code references (classes, constants, functions)
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
4b771d498f
commit
d692485a08
188 changed files with 338 additions and 338 deletions
|
|
@ -91,7 +91,7 @@ function get_start_cmd($user_info,$remote,$server_xml,$home_info,$mod_id,$ip,$po
|
|||
$cli_param_data['IP'] = $ip;
|
||||
$cli_param_data['PORT'] = $port;
|
||||
$cli_param_data['HOSTNAME'] = $home_info['home_name'];
|
||||
$cli_param_data['PID_FILE'] = "ogp_game_startup.pid";
|
||||
$cli_param_data['PID_FILE'] = "gsp_game_startup.pid";
|
||||
|
||||
// Linux
|
||||
if( preg_match("/Linux/", $os) )
|
||||
|
|
|
|||
|
|
@ -3762,7 +3762,7 @@ class GSPDatabaseMySQL extends GSPDatabase
|
|||
case 'server':
|
||||
require_once('includes/lib_remote.php');
|
||||
$home_info = $this->getGameHomeWithoutMods($home_id);
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'], $home_info['agent_port'], $home_info['encryption_key'], $home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'], $home_info['agent_port'], $home_info['encryption_key'], $home_info['timeout']);
|
||||
$agent_online = $remote->status_chk() === 1;
|
||||
if( $agent_online )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class FormTable {
|
|||
print_failure(get_lang_f('invalid_setting_type',$type));
|
||||
}
|
||||
|
||||
if ( defined("OGP_LANG_".$name."_info") )
|
||||
if ( defined("GSP_LANG_".$name."_info") )
|
||||
{
|
||||
echo "</td><td><div class='image-tip' id='".$this->i."' ><img src='images/icon_help_small.gif' ><span class='tip' id='".$this->i."' >".str_replace("'",'"',get_lang($name."_info"))."</span></div></td></tr>";
|
||||
$this->i++;
|
||||
|
|
@ -128,7 +128,7 @@ class FormTable {
|
|||
echo "<tr><td align='right' $td_extra><label for='".$name."'>".get_lang($name).":</label></td>";
|
||||
echo "<td align='left'>".$data."</td>\n";
|
||||
|
||||
if ( defined("OGP_LANG_".$name."_info") )
|
||||
if ( defined("GSP_LANG_".$name."_info") )
|
||||
{
|
||||
echo "<td><div class='image-tip' id='".$this->i."' ><img src='images/icon_help_small.gif' ><span class='tip' id='".$this->i."' >".str_replace("'",'"',get_lang($name."_info"))."</span></div></td>\n</tr>\n";
|
||||
$this->i++;
|
||||
|
|
|
|||
|
|
@ -1047,7 +1047,7 @@ function deleteMysqlAddonDatabasesForGameServerHome($home_id){
|
|||
if($mysql_db['remote_server_id'] != "0")
|
||||
{
|
||||
$remote_server = $db->getRemoteServer($mysql_db['remote_server_id']);
|
||||
$remote = new OGPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$remote = new GSPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$host_stat = $remote->status_chk();
|
||||
if($host_stat === 1 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
// Globals
|
||||
$OGPLangPre = "OGP_LANG_";
|
||||
$GSPLangPre = "GSP_LANG_";
|
||||
|
||||
// Ignore any request with unwanted values at 'm' or 'p'
|
||||
if( isset($_REQUEST['m']) and !preg_match("/^([a-z]|[0-9]|_|-)+$/i", $_REQUEST['m']) )
|
||||
|
|
@ -457,12 +457,12 @@ function getGitHubOrganization($gitHubURL){
|
|||
}
|
||||
|
||||
function getOGPLangConstantsJSON(){
|
||||
global $OGPLangPre;
|
||||
global $GSPLangPre;
|
||||
$finalConsts = array();
|
||||
|
||||
$consts = get_defined_constants(true);
|
||||
foreach($consts["user"] as $key => $value){
|
||||
if(startsWith($key, $OGPLangPre)){
|
||||
if(startsWith($key, $GSPLangPre)){
|
||||
$finalConsts[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ function add_lang_module($lang_module)
|
|||
{
|
||||
global $lang_modules;
|
||||
array_push($lang_modules,$lang_module);
|
||||
// Need to reload langs if module is added after the first ogpLang call.
|
||||
ogpLang();
|
||||
// Need to reload langs if module is added after the first gspLang call.
|
||||
gspLang();
|
||||
}
|
||||
|
||||
function ogpLang()
|
||||
function gspLang()
|
||||
{
|
||||
global $lang_modules;
|
||||
$locale_files = makefilelist("lang/", ".|..|.svn", true, "folders");
|
||||
|
|
@ -68,15 +68,15 @@ function ogpLang()
|
|||
|
||||
function get_lang($lang_index)
|
||||
{
|
||||
global $OGPLangPre;
|
||||
global $GSPLangPre;
|
||||
|
||||
if (defined($lang_index))
|
||||
{
|
||||
return constant($lang_index);
|
||||
}
|
||||
|
||||
if(!startsWith($lang_index, $OGPLangPre)){
|
||||
$newLangIndex = $OGPLangPre . $lang_index;
|
||||
if(!startsWith($lang_index, $GSPLangPre)){
|
||||
$newLangIndex = $GSPLangPre . $lang_index;
|
||||
if (defined($newLangIndex))
|
||||
{
|
||||
return constant($newLangIndex);
|
||||
|
|
@ -89,7 +89,7 @@ function get_lang($lang_index)
|
|||
|
||||
function get_lang_f()
|
||||
{
|
||||
global $OGPLangPre;
|
||||
global $GSPLangPre;
|
||||
$args = func_get_args();
|
||||
$lang_index = array_shift($args);
|
||||
|
||||
|
|
@ -98,8 +98,8 @@ function get_lang_f()
|
|||
return vsprintf(constant($lang_index),$args);
|
||||
}
|
||||
|
||||
if(!startsWith($lang_index, $OGPLangPre)){
|
||||
$newLangIndex = $OGPLangPre . $lang_index;
|
||||
if(!startsWith($lang_index, $GSPLangPre)){
|
||||
$newLangIndex = $GSPLangPre . $lang_index;
|
||||
if (defined($newLangIndex))
|
||||
{
|
||||
return vsprintf(constant($newLangIndex),$args);
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
require_once("Crypt/XXTEA.php");
|
||||
|
||||
// Screen type for servers
|
||||
define("OGP_SCREEN_TYPE_HOME","HOME");
|
||||
define("OGP_SCREEN_TYPE_UPDATE","UPDATE");
|
||||
define("GSP_SCREEN_TYPE_HOME","HOME");
|
||||
define("GSP_SCREEN_TYPE_UPDATE","UPDATE");
|
||||
|
||||
define("AGENT_ERROR_NOT_EXECUTABLE",-13);
|
||||
|
||||
class OGPRemoteLibrary
|
||||
class GSPRemoteLibrary
|
||||
{
|
||||
private $port;
|
||||
private $host;
|
||||
|
|
|
|||
|
|
@ -78,13 +78,13 @@ function navigation() {
|
|||
|
||||
include_once( $include_file );
|
||||
|
||||
if ( !function_exists( 'exec_ogp_module' ) )
|
||||
if ( !function_exists( 'exec_gsp_module' ) )
|
||||
{
|
||||
print_failure("Missing module execute function.");
|
||||
return;
|
||||
}
|
||||
|
||||
exec_ogp_module();
|
||||
exec_gsp_module();
|
||||
return;
|
||||
}
|
||||
print_failure("Invalid subpage given.");
|
||||
|
|
@ -94,12 +94,12 @@ function navigation() {
|
|||
else if ( is_file( MODULES.$_REQUEST['m'].'/'.$_REQUEST['m'].'.php') )
|
||||
{
|
||||
include( MODULES.$_REQUEST['m'].'/'.$_REQUEST['m'].'.php');
|
||||
if ( !function_exists( 'exec_ogp_module' ) )
|
||||
if ( !function_exists( 'exec_gsp_module' ) )
|
||||
{
|
||||
print_failure("Missing module execute function.");
|
||||
return;
|
||||
}
|
||||
exec_ogp_module();
|
||||
exec_gsp_module();
|
||||
}
|
||||
// If files above are not found then we print an error.
|
||||
else
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class OGPView {
|
|||
function menu(){}
|
||||
|
||||
function printView($cleared = false, $dataType = "html") {
|
||||
global $db, $OGPLangPre;
|
||||
global $db, $GSPLangPre;
|
||||
|
||||
if ( is_object($db) && array_key_exists( "GSPDatabase", class_parents($db) ) ) {
|
||||
$panel_settings = $db->getSettings();
|
||||
|
|
@ -82,7 +82,7 @@ class OGPView {
|
|||
// Dump defined constants to json (for language javascript)
|
||||
$jsonStrConsts = getOGPLangConstantsJSON();
|
||||
if($jsonStrConsts !== false){
|
||||
$this->header_code .= '<script type="text/javascript">var langConsts = ' . $jsonStrConsts . ';' . "\n" . 'var langConstPrefix = "' . $OGPLangPre . '";</script>' . "\n";
|
||||
$this->header_code .= '<script type="text/javascript">var langConsts = ' . $jsonStrConsts . ';' . "\n" . 'var langConstPrefix = "' . $GSPLangPre . '";</script>' . "\n";
|
||||
}
|
||||
|
||||
// Include jQuery, jQuery UI, and our global CSS file in the header code
|
||||
|
|
@ -197,7 +197,7 @@ class OGPView {
|
|||
if ( is_object($db) && array_key_exists( "GSPDatabase", class_parents($db) ) ) {
|
||||
$footer .= "<div class=\"footer center\">";
|
||||
$footer .= get_lang_f('cur_theme', !empty($_SESSION['users_theme']) ? $_SESSION['users_theme'] : @$panel_settings['theme']) . " - " . $db->getNbOfQueries()." ".get_lang('queries_executed');
|
||||
$footer .= "<br />".get_lang('copyright')." © <a href=\"http://www.opengamepanel.org\">Open Game Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved')." - <span class='versionInfo'>".get_lang('show_version')."</span><br /><div class='inline-block OGPVersionArea'><span class='version hide'>" . get_lang('version') . ":</span> <span class='hide versionNumber'>".@$panel_settings['ogp_version']."</span> <span class='copyVersionResult' lang='" . get_lang('copied') . "'></span></div></div>";
|
||||
$footer .= "<br />".get_lang('copyright')." © <a href=\"http://www.gameservers-world.com\">GameServer Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved')." - <span class='versionInfo'>".get_lang('show_version')."</span><br /><div class='inline-block GSPVersionArea'><span class='version hide'>" . get_lang('version') . ":</span> <span class='hide versionNumber'>".@$panel_settings['gsp_version']."</span> <span class='copyVersionResult' lang='" . get_lang('copied') . "'></span></div></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue