ultimix
error_log_controller.php
Go to the documentation of this file.
1 <?php
2 
3  /*
4  * This source code is a part of the Ultimix Project.
5  * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6  * it's own license wich could be found from the corresponding files or sources.
7  * This source code is provided "as is" without any warranties or garanties.
8  *
9  * Have a nice day!
10  *
11  * @url http://ultimix.sorceforge.net
12  *
13  * @author Alexey "gdever" Dodonov
14  */
15 
27 
46  function store_404_error_message( $Options )
47  {
48  try
49  {
50  $Security = get_package( 'security' , 'last' , __FILE__ );
51  $ErrorLog = get_package( 'error_log::error_log_access' , 'last' , __FILE__ );
52  $ErrorLog->add_message_to_log(
53  5 , '404' , '{lang:page_was_not_found} '.$Security->get_srv( 'REQUEST_URI' , 'string' )
54  );
55  }
56  catch( Exception $e )
57  {
58  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
59  }
60  }
61 
80  function delete_error( $Options )
81  {
82  try
83  {
84  $SecurityUtilities = get_package( 'security::security_utilities' , 'last' , __FILE__ );
85  $ErrorLogAccess = get_package( 'error_log::error_log_access' , 'last' , __FILE__ );
86 
87  $Ids = $SecurityUtilities->get_global( '_id_' , 'integer' , POST | PREFIX_NAME | KEYS );
88  foreach( $Ids as $k => $id )
89  {
90  $ErrorLogAccess->delete_error_log( $id );
91  }
92  }
93  catch( Exception $e )
94  {
95  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
96  }
97  }
98 
117  function controller( $Options )
118  {
119  try
120  {
121  $ContextSet = get_package( 'gui::context_set' , 'last' , __FILE__ );
122 
123  $ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_404' );
124  $ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_massive_delete' );
125 
126  if( $ContextSet->execute( $Options , $this , __FILE__ ) )
127  {
128  return;
129  }
130  }
131  catch( Exception $e )
132  {
133  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
134  }
135  }
136  }
137 
138 ?>