Skip to content
This repository has been archived by the owner on Jan 1, 2018. It is now read-only.

Commit

Permalink
* some fixes
Browse files Browse the repository at this point in the history
* Bug #00051
* Notices removed
  • Loading branch information
LucasKovacs committed Dec 5, 2013
1 parent d1d1649 commit 67ddbd7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 16 deletions.
10 changes: 10 additions & 0 deletions src/2.10.8/upload/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
if(!defined("INSIDE")){ header("location:./../"); }
$dbsettings = Array(
"server" => "localhost", // MySQL server name.
"user" => "root", // MySQL username.
"pass" => "root", // MySQL password.
"name" => "2.10.8", // MySQL database name.
"prefix" => "xgp_", // Tables prefix.
"secretword" => "XGProyect484998060"); // Cookies.
?>
10 changes: 5 additions & 5 deletions src/2.10.8/upload/includes/pages/class.ShowAlliancePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function __construct ( $CurrentUser )
$d = ( isset ( $_GET['d'] ) ? $_GET['d'] : NULL ); // ELIMINAR RANGO
$edit = ( isset ( $_GET['edit'] ) ? $_GET['edit'] : NULL ); // EDITAR
$rank = intval ( ( isset ( $_GET['rank'] ) ? $_GET['rank'] : NULL ) ); // ADMIN -> RANGOS -> MIEMBROS
$kick = intval ( ( isset ( $_GET['kick'] ) ? $_GET['kick'] : NULL ) ); // ADMIN -> EXPULSAR -> MIEMBROS
$kick = intval ( ( isset ( $_GET['kick'] ) ? $_GET['kick'] : FALSE ) ); // ADMIN -> EXPULSAR -> MIEMBROS
$id = intval ( ( isset ( $_GET['id'] ) ? $_GET['id'] : NULL ) ); // ID DE LA ALIANZA
$yes = ( isset ( $_GET['yes'] ) ? $_GET['yes'] : NULL ); //CONFIRMACION
$allyid = intval ( ( isset ( $_GET['allyid'] ) ? $_GET['allyid'] : NULL ) ); // ID DE LA ALIANZA
Expand Down Expand Up @@ -857,7 +857,7 @@ public function __construct ( $CurrentUser )
header ( "location:game.php?page=alliance" , 2 );
}

if ( isset ( $kick ) )
if ( isset ( $kick ) && $kick != 0 )
{
if ($ally['ally_owner'] != $CurrentUser['id'] && !$user_can_kick)
{
Expand All @@ -873,7 +873,7 @@ public function __construct ( $CurrentUser )
}
elseif ( isset ( $_POST['newrang'] ) )
{
$q = doquery ( "SELECT * FROM {{table}} WHERE id='" . intval ( $u ) . "' LIMIT 1" , 'users' , TRUE );
$q = doquery ( "SELECT * FROM {{table}} WHERE id='" . intval ( $id ) . "' LIMIT 1" , 'users' , TRUE );

if ( ( isset ( $ally_ranks[$_POST['newrang']-1] ) or $_POST['newrang'] == 0 ) && $q['id'] != $ally['ally_owner'] )
{
Expand All @@ -899,7 +899,7 @@ public function __construct ( $CurrentUser )
$lang['i'] = mysql_num_rows($listuser);
$page_list = '';
$r['options'] = '';

while ( $u = mysql_fetch_array ( $listuser ) )
{
$UserPoints = doquery ( "SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '" . intval ( $u['id'] ) . "';" , 'statpoints' , TRUE );
Expand Down Expand Up @@ -928,7 +928,7 @@ public function __construct ( $CurrentUser )
{
$u["acciones"] = '-';
}
elseif ( $ally_ranks[$CurrentUser['ally_rank_id']-1]['kick'] == 1 && $ally_ranks[$CurrentUser['ally_rank_id']-1]['administrieren'] == 1 or $ally['ally_owner'] == $CurrentUser['id'] )
elseif ( isset($ally_ranks[$CurrentUser['ally_rank_id']-1]['kick']) && $ally_ranks[$CurrentUser['ally_rank_id']-1]['kick'] == 1 && isset($ally_ranks[$CurrentUser['ally_rank_id']-1]['administrieren']) && $ally_ranks[$CurrentUser['ally_rank_id']-1]['administrieren'] == 1 or $ally['ally_owner'] == $CurrentUser['id'] )
{
$u["acciones"] = "<a href=\"game.php?page=alliance&mode=admin&edit=members&kick=" . $u['id'] . "\" onclick=\"javascript:return confirm('Estas seguro que deseas expulsar a " . $u['username'] . "?');\"><img src=\"".DPATH."pic/abort.gif\" border=\"0\"></a> <a href=\"game.php?page=alliance&mode=admin&edit=members&rank=" . $u['id'] . "\"><img src=\"" . DPATH . "pic/key.gif\" border=\"0\"></a>";
}
Expand Down
4 changes: 2 additions & 2 deletions src/2.10.8/upload/includes/xml/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</config>
<config>
<name>lastsettedplanetpos</name>
<value>2</value>
<value>3</value>
</config>
<config>
<name>noobprotection</name>
Expand Down Expand Up @@ -118,7 +118,7 @@
</config>
<config>
<name>stat_last_update</name>
<value>1384903316</value>
<value>1386201898</value>
</config>
<config>
<name>stat_settings</name>
Expand Down
14 changes: 7 additions & 7 deletions src/2.10.8/upload/install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
break;
case 'ins':
if ($Page == 1) {
if ($_GET['error'] == 1)
if (isset($_GET['error']) && $_GET['error'] == 1)
{
message ("La conexi&oacute;n a la base de datos a fallado","?mode=ins&page=1", 3, FALSE, FALSE);
}
elseif ($_GET['error'] == 2)
elseif (isset($_GET['error']) && $_GET['error'] == 2)
{
message ("El fichero config.php no puede ser sustituido, no tenia acceso chmod 777","?mode=ins&page=1", 3, FALSE, FALSE);
}
Expand Down Expand Up @@ -76,7 +76,7 @@
exit();
}

$parse[first] = "Conexi&oacute;n establecida con éxito...";
$parse['first'] = "Conexi&oacute;n establecida con éxito...";

fwrite($dz, "<?php\n");
fwrite($dz, "if(!defined(\"INSIDE\")){ header(\"location:".XGP_ROOT."\"); }\n");
Expand All @@ -90,7 +90,7 @@
fwrite($dz, "?>");
fclose($dz);

$parse[second] = "Archivo config.php creado con éxito...";
$parse['second'] = "Archivo config.php creado con éxito...";

doquery ($QryTableAks , 'aks' );
doquery ($QryTableAlliance , 'alliance' );
Expand All @@ -107,13 +107,13 @@
doquery ($QryTableStatPoints , 'statpoints' );
doquery ($QryTableUsers , 'users' );

$parse[third] = "Tablas creadas con &eaute;xito...";
$parse['third'] = "Tablas creadas con &eaute;xito...";

$frame = parsetemplate(gettemplate('install/ins_form_done'), $parse);
}
elseif ($Page == 3)
{
if ($_GET['error'] == 3)
if (isset($_GET['error']) && $_GET['error'] == 3)
message ("&iexcl;Debes completar todos los campos!","?mode=ins&page=3", 2, FALSE, FALSE);

$frame = parsetemplate(gettemplate('install/ins_acc'), FALSE);
Expand Down Expand Up @@ -190,7 +190,7 @@

update_config ( 'stat_last_update' , time() );

$frame = parsetemplate(gettemplate('install/ins_acc_done'), $parse);
$frame = parsetemplate(gettemplate('install/ins_acc_done'), '');
}
break;
case'upgrade':
Expand Down
4 changes: 3 additions & 1 deletion src/2.10.8/upload/language/english/CHANGELOG.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
$lang['Description'] = 'Description';
$lang['changelog'] = array(

'2.10.8' => ' 27/11/2013
'2.10.8' => ' 04/12/2013
- [Mejoras]
- Más notices corregidos.-
- [Bugs]
#00050: Bug que no permitía intercambiar recursos con el mercader.-
#00051: Bug que no permitía cambiar el rango a un usuario en una alianza.-
',

'2.10.7' => ' 20/11/2013
Expand Down
4 changes: 3 additions & 1 deletion src/2.10.8/upload/language/spanish/CHANGELOG.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
$lang['Description'] = 'Descripción';
$lang['changelog'] = array(

'2.10.8' => ' 27/11/2013
'2.10.8' => ' 04/12/2013
- [Mejoras]
- Más notices corregidos.-
- [Bugs]
#00050: Bug que no permitía intercambiar recursos con el mercader.-
#00051: Bug que no permitía cambiar el rango a un usuario en una alianza.-
',

'2.10.7' => ' 20/11/2013
Expand Down

1 comment on commit 67ddbd7

@LucasKovacs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ignore config.xml and config.php changes.

Please sign in to comment.