Jump to content
InvisionCommunity.de - Der Deutsche Invision Community Support
Sign in to follow this  
kdt

Fehler im 2.2.2. wenn man kein Geburtsdatum einträgt.

Recommended Posts

Ich habe ja ein 2.2.2. mit so vielen Mods, dass ich eigentlich zur 3.x warten will um ein Update einzuspielen. Soweit bin ich ja mit meiner Version zufrieden.

Eine Macke habe ich aber, die mich als Admin immer wieder gestellt wird.

Möchte jemand sein Profil ändern (wir haben auch Custom Einträge, die sich mal ändern) und der User möchte nicht sein Geburtsdatum eingeben, dann bekommt er immer die Meldung, dass das Geb-Datum falsch ist.

Es muss dann ein Geb-Datum angegeben werden, wo dann hier viele schwindeln und dann umsonst Geburtstagswünsche bekommen.

Nachtrag:

Ich habe es gefunden:

Der Fehler liegt in der Datei: /sources/lib/func_usercp.php

Lösung:

Suche im 2.2.2. nach:

				//-----------------------------------------

				// Make sure it's a legal date

				//-----------------------------------------


				$_year = $this->ipsclass->input['year'] ? $this->ipsclass->input['year'] : 1999;


				if ( ! checkdate( $this->ipsclass->input['month'], $this->ipsclass->input['day'], $_year ) )

				{

						$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'ucp_birthday_legal_date' ) );

				}
Lösche diesen Teil komplett, er wird gleich an einer anderen STelle erneut eingefügt. Suche nun nach:
				//-----------------------------------------

				// make sure that either we entered

				// all calendar fields, or we left them

				// all blank

				//-----------------------------------------


				$c_cnt = 0;


				foreach ( array('day','month','year') as $v )

				{

						if ( ! empty($this->ipsclass->input[$v] ) )

						{

								$c_cnt++;

						}

				}


				if ( ($c_cnt > 0) and ($c_cnt != 3) )

				{

						$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'calendar_not_all' ) );

				}
Platziere direkt danach folgenden Code:
				else if( ($c_cnt > 0) and ($c_cnt == 3) )

				{

						//-----------------------------------------

						// Make sure it's a legal date

						//-----------------------------------------


						$_year = $this->ipsclass->input['year'] ? $this->ipsclass->input['year'] : 1999;


						if ( ! checkdate( $this->ipsclass->input['month'], $this->ipsclass->input['day'], $_year ) )

						{

								$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'ucp_birthday_legal_date' ) );

						}

				}

Edited by kdt

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×