debugging and code simplification

This commit is contained in:
Isaac Connor 2017-10-30 16:29:27 -04:00
parent 97757ba6cd
commit 1694eeb436
1 changed files with 861 additions and 842 deletions

View File

@ -17,7 +17,7 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// //
warning("Un error");
// PP - POST request handler for PHP which does not need extensions // PP - POST request handler for PHP which does not need extensions
// credit: http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/ // credit: http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/
@ -78,7 +78,11 @@ function getAffectedIds( $name ) {
} }
if ( !empty($action) ) { if ( empty($action) ) {
Warning("No action");
return;
}
Warning("Have action $action");
if ( $action == 'login' && isset($_REQUEST['username']) && ( ZM_AUTH_TYPE == 'remote' || isset($_REQUEST['password']) ) ) { if ( $action == 'login' && isset($_REQUEST['username']) && ( ZM_AUTH_TYPE == 'remote' || isset($_REQUEST['password']) ) ) {
// if true, a popup will display after login // if true, a popup will display after login
// PP - lets validate reCaptcha if it exists // PP - lets validate reCaptcha if it exists
@ -681,7 +685,23 @@ Warning("Addterm");
// System edit actions // System edit actions
if ( canEdit( 'System' ) ) { if ( canEdit( 'System' ) ) {
if ( isset( $_REQUEST['object'] ) ) { if ( isset( $_REQUEST['object'] ) ) {
if ( $_REQUEST['object'] == 'server' ) { Warning("Have object: " . $_REQUEST['object']);
if ( $_REQUEST['object'] == 'MontageLayout' ) {
require_once('MontageLayout.php');
if ( $action == 'Save' ) {
$Layout = null;
if ( $_REQUEST['Name'] != '' ) {
$Layout = new MontageLayout();
$Layout->Name( $_REQUEST['Name'] );
} else {
$Layout = new MontageLayout( $_REQUEST['zmMontageLayout'] );
}
Warning("Positions: " . $_REQUEST['Positions'] );
$Layout->Positions( $_REQUEST['Positions'] );
$Layout->save();
} // end if save
} else if ( $_REQUEST['object'] == 'server' ) {
if ( $action == 'Save' ) { if ( $action == 'Save' ) {
if ( !empty($_REQUEST['id']) ) if ( !empty($_REQUEST['id']) )
@ -928,6 +948,5 @@ Warning("Addterm");
setcookie( 'zmEventResetTime', $_SESSION['zmEventResetTime'], time()+3600*24*30*12*10 ); setcookie( 'zmEventResetTime', $_SESSION['zmEventResetTime'], time()+3600*24*30*12*10 );
//if ( $cookies ) session_write_close(); //if ( $cookies ) session_write_close();
} }
}
?> ?>