Wednesday 25 June 2003 1:11:33 am
Hi Bruce .. About my modifications, i don`t think ez team will include it , coz it`s custom, such .. if user not admin and he edit something in site, but he change his mind, then if he click 'Discard' , then no need for confirmation to delete, so i had add this to kernel/content/edit :
if ( $module->isCurrentAction( 'Discard' ) )
{
$http =& eZHTTPTool::instance();
$objectID = $object->attribute( 'id' );
$http->setSessionVariable( 'DiscardObjectID', $objectID );
$http->setSessionVariable( 'DiscardObjectVersion', $EditVersion );
$http->setSessionVariable( 'DiscardObjectLanguage', $EditLanguage );
// Added by Me ...
// This will remove the edited version form DB direct without confirmation
if($http->hasVariable( 'RedirectURI' ))
{
$Page = $http->Variable( 'RedirectURI' );
$http->setSessionVariable( 'None_Confirm', "Remove" );
$http->setSessionVariable( 'UserRedirectURI', "$Page" );
} // End By Me and i had add this in removeeditversion.php :
if ( $http->hasPostVariable( "ConfirmButton" ) Or $http->hasSessionVariable( 'None_Confirm' ) )
$http->removeSessionVariable( 'None_Confirm' );
.
.
.. }
// Added By Me ...
if($http->hasSessionVariable( 'UserRedirectURI' ) )
{
$Page = $http->sessionVariable( 'UserRedirectURI' ) ;
$http->removeSessionVariable( 'UserRedirectURI' );
$Module->redirectTo( $Page );
$hasRedirected = true;
if(!$Page) $hasRedirected = false;
}
// End
if ( $http->hasSessionVariable( 'ParentObject' ) && $http->sessionVariable( 'NewObjectID' ) == $objectID and !$hasRedirected) then also i had add line to redirect the user by getting from $_POST array after submiting ... becoz as know if form have hidden input named with 'RedirectURI' must redirect user to this page, but this is missing from edit.php .. so i had added this lines to do this :
if($http->hasVariable( 'RedirectURI' ))
{
$Page = $http->Variable( 'RedirectURI' );
$module->redirectTo( $Page );
$hasRedirected = true;
if(!$Page) $hasRedirected = false;
}
//
if ( $http->hasSessionVariable( 'ParentObject' ) && $http->sessionVariable( 'NewObjectID' ) == $object->attribute( 'id' ) and !$hasRedirected) { This part of modifications ... as you see, i cann`t make module from this ... but now thinking about another solution, workflow .. maybe can solve my problem , but am not sure, but i`ll try with final 3.1 , as i had read today will be release, and do you what the best thing with ezp crew ? .... the timeframe, they didn`t get out of timeframe, so well done ez crew ;)
There is 3 question, I have no idae about it : 1. When i download the ezp I cann`t find .svn folder in the zip file, and without it i get svn error, where to get it? should i make svn to download the new version of ezp ? 2. The svn will update the code, nice, but what if there is mysql update, can svn do it ?? 3. I don`t have root access on the host, can i install the svn on my folder, or i must request the host root for that ?
|