Meetings
--
- -diff --git a/app/Providers/ZendFrameworkServiceProvider.php b/app/Providers/ZendFrameworkServiceProvider.php index 1e178871d..41f724cc7 100644 --- a/app/Providers/ZendFrameworkServiceProvider.php +++ b/app/Providers/ZendFrameworkServiceProvider.php @@ -333,12 +333,6 @@ private function setupIxpTools( array $options ): array { $options['peeringdb']['url'] = config( 'ixp_tools.peeringdb_url' ); } - if( is_array( config('ixp_tools.meeting') ) ) { - foreach( config('ixp_tools.meeting') as $k => $v ) { - $options['meeting'][$k] = $v; - } - } - if( config( 'ixp_tools.billing_updates_notify' ) ) { $options['billing']['updates_notify'] = config( 'ixp_tools.billing_updates_notify' ); } diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index 5a6a0ccce..ab89e9d0a 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -52,24 +52,6 @@ public function indexAction() $this->view->isSuperUser = $this->getUser()->isSuperUser(); $this->view->crossConnects = $this->getD2R( "\\Entities\\Customer" )->getCrossConnects( $this->getCustomer()->getId() ); - /* - // is there a meeting available to register for? - $this->view->meeting = false; - - if( ( $meeting = MeetingTable::getUpcomingMeeting() ) !== false - && ( !isset( $this->session->dashboard_skip_meeting ) || !$this->session->dashboard_skip_meeting ) - ) - { - $rsvp = $this->getUser()->hasPreference( 'meeting.attending.' . $meeting['id'] ); - - if( $rsvp === false ) - { - $this->view->meeting = $meeting; - $this->view->meeting_pref = $rsvp; - } - } - */ - if( !$this->getCustomer()->isTypeAssociate() ) { diff --git a/application/controllers/MeetingController.php b/application/controllers/MeetingController.php deleted file mode 100644 index 82b7caf9a..000000000 --- a/application/controllers/MeetingController.php +++ /dev/null @@ -1,347 +0,0 @@ - - * @category IXP - * @package IXP_Controller - * @copyright Copyright (C) 2009-2016 Internet Neutral Exchange Association Company Limited By Guarantee - * @license http://www.gnu.org/licenses/gpl-2.0.html GNU GPL V2.0 - */ -class MeetingController extends IXP_Controller_FrontEnd -{ - - /** - * This function sets up the frontend controller - */ - protected function _feInit() - { - $this->view->feParams = $this->_feParams = (object)[ - 'entity' => '\\Entities\\Meeting', - 'form' => 'IXP_Form_Meeting', - 'pagetitle' => 'Meetings', - - 'titleSingular' => 'Meeting', - 'nameSingular' => 'a meeting', - - 'listOrderBy' => 'date', - 'listOrderByDir' => 'DESC' - ]; - - switch( $this->getUser()->getPrivs() ) - { - case \Entities\User::AUTH_SUPERUSER: - $this->_feParams->listColumns = [ - 'id' => [ 'title' => 'UID', 'display' => false ], - - 'title' => 'Title', - - 'date' => [ - 'title' => 'Date', - 'type' => self::$FE_COL_TYPES[ 'DATE' ] - ], - - 'time' => [ - 'title' => 'Time', - 'type' => self::$FE_COL_TYPES[ 'TIME' ] - ], - - 'created_by' => [ - 'title' => 'Created By', - 'type' => self::$FE_COL_TYPES[ 'HAS_ONE' ], - 'controller' => 'customer', - 'action' => 'overview', - 'idField' => 'userid' - ] - ]; - - $this->_feParams->defaultAction = 'list'; - break; - - case \Entities\User::AUTH_CUSTUSER: - $this->_feParams->allowedActions = [ 'read', 'rsvp', 'simple' ]; - $this->_feParams->defaultAction = 'read'; - break; - - default: - $this->_feParams->allowedActions = [ 'simple' ]; - $this->_feParams->defaultAction = 'simple'; - break; - } - } - - /** - * Provide array of users for the listAction and viewAction - * - * @param int $id The `id` of the row to load for `viewAction`. `null` if `listAction` - */ - protected function listGetData( $id = null ) - { - $qb = $this->getD2EM()->createQueryBuilder() - ->select( 'm.id AS id, m.title AS title, m.date AS date, m.time AS time, - m.before_text AS before_text, m.after_text AS after_text, - m.venue AS venue, m.venue_url AS venue_url, m.created_at AS created_at, - m.updated_at AS updated_at, - u.id AS userid, u.username AS created_by' - ) - ->from( '\\Entities\\Meeting', 'm' ) - ->leftJoin( 'm.CreatedBy', 'u' ); - - if( isset( $this->_feParams->listOrderBy ) ) - $qb->orderBy( $this->_feParams->listOrderBy, isset( $this->_feParams->listOrderByDir ) ? $this->_feParams->listOrderByDir : 'ASC' ); - - if( $id !== null ) - $qb->andWhere( 'm.id = ?1' )->setParameter( 1, $id ); - - return $qb->getQuery()->getResult(); - } - - - /** - * Preparation hook that can be overridden by subclasses for add and edit. - * - * This is called just before we process a possible POST / submission and - * will allow us to change / alter the form or object. - * - * @param IXP_Form_Meeting $form The Send form object - * @param \Entities\Meeting $object The Doctrine2 entity (being edited or blank for add) - * @param bool $isEdit True if we are editing, otherwise false - */ - protected function addPrepare( $form, $object, $isEdit ) - { - if( $isEdit ) - { - $form->getElement( 'date' )->setValue( $object->getDate()->format( 'Y-m-d' ) ); - $form->getElement( 'time' )->setValue( $object->getTime()->format( 'H:i' ) ); - } - - return true; - } - - /** - * - * @param IXP_Form_Meeting $form The form object - * @param \Entities\Meeting $object The Doctrine2 entity (being edited or blank for add) - * @param bool $isEdit True of we are editing an object, false otherwise - * @return void - */ - protected function addPostValidate( $form, $object, $isEdit ) - { - $object->setUpdatedBy( $this->getUser()->getId() ); - $object->setUpdatedAt( new DateTime() ); - - if( !$isEdit ) - { - $object->setCreatedBy( $this->getUser() ); - $object->setCreatedAt( new DateTime() ); - } - - return true; - } - - - /** - * - * @param IXP_Form_Meeting $form The form object - * @param \Entities\Meeting $object The Doctrine2 entity (being edited or blank for add) - * @param bool $isEdit True if we are editing, otherwise false - * @return bool If false, the form is not processed - */ - protected function addPreFlush( $form, $object, $isEdit ) - { - - if( !( $object->getDate() instanceof DateTime ) ) - $object->setDate( new DateTime( $form->getValue( 'date' ) ) ); - - if( !( $object->getTime() instanceof DateTime ) ) - $object->setTime( new DateTime( $form->getValue( 'time' ) ) ); - - return true; - } - - - public function readAction() - { - $this->view->entries = $this->getD2EM()->createQuery( - 'SELECT m, mi FROM \\Entities\\Meeting m LEFT JOIN m.MeetingItems mi ORDER BY m.date DESC, mi.other_content ASC' - ) - ->execute(); - - $this->view->simple = false; - } - - /** - * A simple HTML snippet for display on other websites - */ - public function simpleAction() - { - $this->view->entries = $this->getD2EM()->createQuery( - 'SELECT m, mi FROM \\Entities\\Meeting m LEFT JOIN m.MeetingItems mi ORDER BY m.date DESC, mi.other_content ASC' - ) - ->execute(); - - $this->view->simple = true; - - if( $this->getParam( 'nostyle', false ) ) - { - Zend_Controller_Action_HelperBroker::removeHelper( 'viewRenderer' ); - $this->view->display( 'meeting/simple2.phtml' ); - } - else - $this->view->display( 'meeting/simple.phtml' ); - } - - - public function rsvpAction() - { - die( "Needs update to IXP V2 Rewrite with Doctrine2" ); - /* - $meeting = Doctrine_Core::getTable( 'Meeting' )->find( $this->_request->getParam( 'id', null ) ); - - if( !$meeting ) - exit; - - $answer = $this->_getParam( 'answer', null ); - - if( !in_array( $answer, array( 'attend', 'noattend', 'skip', 'dontask' ) ) ) - exit; - - $response = 1; - $msg = false; - - switch( $answer ) - { - case 'skip': - $this->getLogger()->debug( 'User skipped meeting RSVP request' ); - $this->session->dashboard_skip_meeting = true; - break; - - case 'dontask': - $this->getLogger()->debug( 'User asked not to be asked to RSVP again' ); - $this->getUser()->setPreference( 'meeting.attending.' . $meeting['id'], 'DONT_ASK' ); - break; - - case 'attend': - $msg = 'ATTEND'; - $this->getLogger()->debug( 'User will be attending this meeting' ); - $this->getUser()->setPreference( 'meeting.attending.' . $meeting['id'], 'ATTENDING' ); - break; - - case 'noattend': - $msg = 'NOT ATTEND'; - $this->getLogger()->debug( 'User will not be attending this meeting' ); - $this->getUser()->setPreference( 'meeting.attending.' . $meeting['id'], 'NOT_ATTENDING' ); - break; - - } - - if( $msg !== false ) - { - $mail = new Zend_Mail(); - $mail->addTo( $this->config['meeting']['rsvp_to_email'], $this->config['meeting']['rsvp_to_name'] ) - ->setSubject( '[Meeting RSVP] ' . $msg . ': ' . $this->getUser()->email . '/' . $this->customer['name'] ) - ->setBodyText( "\nThis is an automated message from the IXP Manager.\n\n" - . "The following person has indicated that they will $msg the meeting scheduled for {$meeting['date']}\n\n" - . "{$this->getUser()->username} / {$this->getUser()->email} / {$this->customer['name']}\n\n" - ); - $mail->setFrom( $this->_config['identity']['autobot']['email'] ); - - try { - $mail->send(); - } catch( Zend_Mail_Exception $e ) { - $response = 0; - $this->getLogger()->err( $e->getMessage() ); - } - } - - $this->getResponse() - ->setHeader( 'Content-Type', 'text/html' ) - ->setBody( Zend_Json::encode( array( 'response' => $response ) ) ) - ->sendResponse(); - - exit; - */ - } - - - public function composeAction() - { - $this->view->meeting = $meeting = $this->getD2EM()->getRepository( '\\Entities\\Meeting' )->find( $this->getParam( 'id' ) ); - - if( !$meeting ) - { - $this->addMessage( "Invalid meeting selected", OSS_Message::ERROR ); - $this->redirectAndEnsureDie( 'meeting/list' ); - } - - do - { - - if( $this->getParam( 'send', false ) ) - { - $this->view->to = $this->getParam( 'to' ); - $this->view->from = $this->getParam( 'from' ); - $this->view->bcc = $this->getParam( 'bcc' ); - $this->view->subject = trim( stripslashes( $this->getParam( 'subject' ) ) ); - $this->view->body = trim( stripslashes( $this->getParam( 'body' ) ) ); - - foreach( array( 'to', 'from', 'bcc' ) as $p ) - { - $v = trim( $this->_getParam( $p ) ); - $$p = $v; - - if( $p == 'bcc' && $v == '' ) continue; - - if( !Zend_Validate::is( $v, 'EmailAddress' ) ) - { - $this->addMessage( "Invalid email address in the '$p' field", OSS_Message::ERROR ); - break 2; - } - } - - $mail = $this->getMailer(); - $mail->addTo( $to ); - $mail->setFrom( $from ); - if( $bcc != '' ) $mail->addBcc( $bcc ); - $mail->setSubject( trim( stripslashes( $this->getParam( 'subject' ) ) ) ); - $mail->setBodyHtml( $this->view->render( 'meeting/email/meeting.phtml' ), 'utf8' ); - - try { - $mail->send(); - $this->addMessage( "Email sent successfully", OSS_Message::SUCCESS ); - } catch( Zend_Mail_Exception $e ) { - $thisaddMessage( "Error: Could not send email.", OSS_Message::ERROR ); - $this->getLogger()->err( $e->getMessage() ); - } - - } - - }while( false ); - } - -} diff --git a/application/controllers/MeetingItemController.php b/application/controllers/MeetingItemController.php deleted file mode 100644 index 9e01ddd2b..000000000 --- a/application/controllers/MeetingItemController.php +++ /dev/null @@ -1,305 +0,0 @@ - - * @category IXP - * @package IXP_Controller - * @copyright Copyright (C) 2009-2016 Internet Neutral Exchange Association Company Limited By Guarantee - * @license http://www.gnu.org/licenses/gpl-2.0.html GNU GPL V2.0 - */ -class MeetingItemController extends IXP_Controller_FrontEnd -{ - /** - * This function sets up the frontend controller - */ - protected function _feInit() - { - $this->view->feParams = $this->_feParams = (object)[ - 'entity' => '\\Entities\\MeetingItem', - 'form' => 'IXP_Form_Meeting_Item', - 'pagetitle' => 'Presentations', - - 'titleSingular' => 'Presentation', - 'nameSingular' => 'a presentation', - - 'listOrderBy' => 'name', - 'listOrderByDir' => 'DESC' - ]; - - switch( $this->getUser()->getPrivs() ) - { - case \Entities\User::AUTH_SUPERUSER: - $this->_feParams->listColumns = [ - 'id' => [ 'title' => 'UID', 'display' => false ], - 'title' => 'Title', - 'name' => 'Name', - 'company' => 'Company', - - 'mtitle' => [ - 'title' => 'Meeting', - 'type' => self::$FE_COL_TYPES[ 'HAS_ONE' ], - 'controller' => 'meeting', - 'action' => 'view', - 'idField' => 'mid' - ] - ]; - $this->_feParams->defaultAction = 'list'; - break; - - case \Entities\User::AUTH_CUSTUSER: - $this->_feParams->allowedActions = [ 'get-presentation' ]; - break; - - default: - $this->redirectAndEnsureDie( 'error/insufficient-permissions' ); - break; - } - } - - - /** - * Provide array of presentations - * - * @param int $id The `id` of the row to load for `viewAction`. `null` if `listAction` - */ - protected function listGetData( $id = null ) - { - $this->view->meetings = $meetings = $this->getD2EM()->getRepository( '\\Entities\\Meeting' )->getTitles(); - - $qb = $this->getD2EM()->createQueryBuilder() - ->select( 'mi.id AS id, mi.title AS title, mi.name AS name, mi.role AS role, - mi.email AS email, mi.company AS company, mi.company_url AS company_url, - mi.summary AS summary, mi.presentation AS presentation, mi.filename AS filename, - mi.created_by AS created_by, mi.created_at AS created_at, - mi.updated_by AS updated_by, mi.updated_at AS updated_at, - m.id AS mid, m.title AS mtitle' - ) - ->from( '\\Entities\\MeetingItem', 'mi' ) - ->leftJoin( 'mi.Meeting', 'm' ); - - if( isset( $this->_feParams->listOrderBy ) ) - $qb->orderBy( $this->_feParams->listOrderBy, isset( $this->_feParams->listOrderByDir ) ? $this->_feParams->listOrderByDir : 'ASC' ); - - if( $id !== null ) - $qb->andWhere( 'mi.id = ?1' )->setParameter( 1, $id ); - - if( ( $mid = $this->getParam( 'mid', false ) ) && isset( $meetings[$mid] ) ) - { - $this->view->mid = $mid; - $qb->where( 'm.id = ?2' )->setParameter( 2, $mid ); - } - - return $qb->getQuery()->getResult(); - } - - /** - * Return the presentation file - */ - protected function getPresentationAction() - { - Zend_Controller_Action_HelperBroker::removeHelper( 'viewRenderer' ); - - if( !( $pres = $this->getD2EM()->getRepository( '\\Entities\\MeetingItem' )->find( $this->getParam( 'id', null ) ) ) ) - { - $this->addMessage( - 'The requested presentation does not exist or does not have an associated file attached to it.', - OSS_Message::ERROR - ); - $this->redirect( 'meeting/read' ); - } - - $fn = "IXP_Members_Meeting_{$pres->getMeeting()->getDate()->format( 'Y-m-d' )}_({$pres->getId()})."; - - // What kind of file do we have? - if( preg_match( '/pdf$/i', $pres->getFilename() ) ) { - header('Content-type: application/pdf'); - $fn .= 'pdf'; - } - else if( preg_match( '/ppt$/i', $pres->getFilename() ) ) { - header('Content-type: application/vnd.ms-powerpoint'); - $fn .= 'ppt'; - } - else if( preg_match( '/pps$/i', $pres->getFilename() ) ) { - header('Content-type: application/vnd.ms-powerpoint'); - $fn .= 'pps'; - } - else if( preg_match( '/pptx$/i', $pres->getFilename() ) ) { - header( 'Content-type: application/vnd.ms-powerpoint' ); - $fn .= 'pptx'; - } - else { - header( 'Content-type: application/octet-stream' ); - $fn .= substr( $pres->getFilename(), strrpos( $pres->getFilename(), '.' ) ); - } - - - header( 'Content-Disposition: attachment; filename="' . $fn . '"' ); - - echo @file_get_contents( self::getMeetingsDirectory() . DIRECTORY_SEPARATOR - . $pres->getMeeting()->getId() . DIRECTORY_SEPARATOR . $pres->getPresentation() - ); - } - - - /** - * - * @param IXP_Form_Meeting_Item $form - * @param \Entities\MeetingItem $object - * @param bool $isEdit - * @param array $options Options passed onto Zend_Form - * @param string $cancelLocation Where to redirect to if 'Cancal' is clicked - * @return void - */ - protected function formPostProcess( $form, $object, $isEdit, $options = null, $cancelLocation = null ) - { - if( $isEdit ) - $form->getElement( 'meeting_id' )->setValue( $object->getMeeting()->getId() ); - } - - - /** - * - * @param IXP_Form_Meeting_Item $form - * @param \Entities\MeetingItem $object - * @param bool $isEdit - * @return void - */ - protected function addPostValidate( $form, $object, $isEdit ) - { - $object->setMeeting( - $this->getD2EM()->getRepository( '\\Entities\\Meeting' )->find( $form->getElement( 'meeting_id' )->getValue() ) - ); - - return true; - } - - /** - * - * @param IXP_Form_Meeting_Item $form - * @param \Entities\MeetingItem $object - * @param bool $isEdit - */ - protected function addPreFlush( $form, $object, $isEdit ) - { - $object->setUpdatedBy( $this->getUser()->getId() ); - $object->setUpdatedAt( new DateTime() ); - - if( !$isEdit ) - { - $object->setCreatedBy( $this->getUser()->getId() ); - $object->setCreatedAt( new DateTime() ); - } - - // is there a file upload? - if( $form->getValue( 'presentation' ) != '' ) - { - // lets make more memory available for large files - ini_set( 'memory_limit', '512M' ); - - $this->getLogger()->debug( 'Received upload of file: ' . $form->getValue( 'presentation' ) ); - - // Zend sticks the original filename in the form variable - $object->setFilename( $form->getValue( 'presentation' ) ); - - // make sure meetings exists - if( !is_dir( self::getMeetingsDirectory() ) && !@mkdir( self::getMeetingsDirectory() ) ) - { - $this->getLogger()->crit( 'Could not create presentations directory.' ); - throw new IXP_Exception( 'Presentations directory does not exist and could not be created.' ); - } - - // now, create a directory for this meeting if it does not already exists - $meeting_dir = self::getMeetingsDirectory() . DIRECTORY_SEPARATOR . $object->getMeeting()->getId(); - - if( !is_dir( $meeting_dir ) && !@mkdir( $meeting_dir ) ) - { - $this->getLogger()->crit( 'Could not create meeting directory.' ); - throw new IXP_Exception( 'Meeting directory does not exist and could not be created.' ); - } - - // get the extension for this presentation - - if( strrpos( $object->getFilename(), '.' ) === false ) - $exten = ''; - else - $exten = substr( $object->getFilename(), strrpos( $object->getFilename(), '.' ) ); - - // we need the row ID so we'll do a save - if( !$isEdit ) - $this->getD2EM()->persist( $object ); - $this->getD2EM()->flush(); - - $object->setPresentation( $object->getId() . $exten ); - $this->getLogger()->debug( 'Uploaded file will be saved as: ' . $object->getPresentation() ); - - // delete an existing file in case we're updating - $ePres = $meeting_dir . DIRECTORY_SEPARATOR . $object->getPresentation(); - if( @file_exists( $ePres ) ) - { - $this->getLogger()->debug( 'Pre-existing file exists so deleting' ); - @unlink( $ePres ); - } - - @rename( $form->getElement( 'presentation' )->getFilename(), $ePres ); - } - - return true; - } - - /** - * Before deleting a meeting, delete meeting items. - * - * @param \Entities\MeetingItem $object - */ - protected function preDelete( $object ) - { - // if a presentation exists, remove it - $dir = self::getMeetingsDirectory() . DIRECTORY_SEPARATOR . $object->getMeeting()->getId(); - - $file = $dir . DIRECTORY_SEPARATOR . $object->getPresentation(); - - if( file_exists( $file ) ) - @unlink( $file ); - - // remove the directory also if it is empty - if( count( @scandir( $dir ) ) == 2 ) - @rmdir( $dir ); - - return true; - } - - - /** - * Return the path where meeting presentations are stored - * @return string The path where meeting presentations are stored - */ - public static function getMeetingsDirectory() - { - // We're going to store presentations in the var directory under meetings. - return APPLICATION_PATH . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR - . 'var' . DIRECTORY_SEPARATOR . 'meetings'; - } -} diff --git a/application/controllers/PublicMeetingController.php b/application/controllers/PublicMeetingController.php deleted file mode 100644 index 3c6a8a149..000000000 --- a/application/controllers/PublicMeetingController.php +++ /dev/null @@ -1,113 +0,0 @@ - - * @category IXP - * @package IXP_Controller - * @copyright Copyright (C) 2009-2016 Internet Neutral Exchange Association Company Limited By Guarantee - * @license http://www.gnu.org/licenses/gpl-2.0.html GNU GPL V2.0 - */ -class PublicMeetingController extends IXP_Controller_Action -{ - - /** - * A simple HTML snippet for display on other websites - */ - public function simpleAction() - { - $this->view->limit = $limit = (int)$this->getParam( 'limit', 0 ); - - $q = $this->getD2EM()->createQuery( - 'SELECT m, mi FROM \\Entities\\Meeting m LEFT JOIN m.MeetingItems mi - ORDER BY m.date DESC, mi.other_content ASC' - ); - - if( $limit && $limit > 0 ) - $q->setMaxResults( $limit ); - - $this->view->entries = $q->execute(); - $this->view->simple = true; - - Zend_Controller_Action_HelperBroker::removeHelper( 'viewRenderer' ); - if( $this->getParam( 'nostyle', false ) ) - $this->view->display( 'meeting/simple2.phtml' ); - else - $this->view->display( 'meeting/simple.phtml' ); - } - - - /** - * A simple HTML snippet for display on other websites - */ - public function ajaxJsonAction() - { - $meetings = $this->getD2EM()->createQuery( - 'SELECT m, mi FROM \\Entities\\Meeting m LEFT JOIN m.MeetingItems mi ORDER BY m.date DESC, mi.other_content ASC' - ) - ->execute(); - - $j = []; - $i = 0; - foreach( $meetings as $m ) { - $j[$i]['title'] = $m->getTitle(); - $j[$i]['before_text'] = $m->getBeforeText(); - $j[$i]['after_text'] = $m->getAfterText(); - - $date = Carbon::instance( $m->getDate() )->setTime( - $m->getTime()->format('H'), $m->getTime()->format('i'), $m->getTime()->format('s') ); - $j[$i]['date'] = $date->format('Y-m-d') . 'T' . $date->format('H:i:s') . 'Z'; - $j[$i]['dateText'] = $date->format( 'l, F jS, Y' ); - $j[$i]['venue'] = $m->getVenue(); - $j[$i]['venue_url'] = $m->getVenueUrl() ? $m->getVenueUrl() : false; - - foreach( $m->getMeetingItems() as $mi ) { - $item = []; - - $item['title'] = $mi->getTitle(); - $item['name'] = $mi->getName(); - $item['role'] = $mi->getRole(); - $item['email'] = $mi->getEmail(); - $item['company'] = $mi->getCompany(); - $item['company_url'] = $mi->getCompanyUrl(); - $item['summary'] = $mi->getSummary(); - $item['other_content'] = $mi->getOtherContent() ? true : false; - - $j[$i]['talks'][] = $item; - } - - $i++; - if( $i > 10 ) break; // hack for some utf8 encoding issue - } - - $json = json_encode( $j, JSON_PRETTY_PRINT ); - // $this->getD2Cache()->save( 'public_meeting_json', $json, 3600 ); - echo $json; - } - -} - diff --git a/application/controllers/PublicStatisticsController.php b/application/controllers/PublicStatisticsController.php deleted file mode 100644 index d9559d10d..000000000 --- a/application/controllers/PublicStatisticsController.php +++ /dev/null @@ -1,144 +0,0 @@ - - * @category IXP - * @package IXP_Controller - * @copyright Copyright (C) 2009-2016 Internet Neutral Exchange Association Company Limited By Guarantee - * @license http://www.gnu.org/licenses/gpl-2.0.html GNU GPL V2.0 - */ -class PublicStatisticsController extends IXP_Controller_Action -{ - use IXP_Controller_Trait_Statistics; - - public function init() { - if( !config('ixp_fe.statistics.public', true ) ) { - throw new Zend_Controller_Action_Exception('This page does not exist', 404); - } - } - - - public function publicAction() - { - // get the available graphs - $ixps = $this->getD2R( '\\Entities\\IXP' )->findAll(); - $grapher = App::make('IXP\Services\Grapher'); - $category = $this->setCategory( 'category', true ); - - $graphs = []; - foreach( $ixps as $ixp ) - { - $graphs[] = $grapher->ixp( $ixp ) - ->setType( Graph::TYPE_PNG ) - ->setProtocol( Graph::PROTOCOL_ALL ) - ->setCategory( $category ); - - foreach( $ixp->getInfrastructures() as $inf ) - { - $graphs[] = $grapher->infrastructure( $inf ) - ->setType( Graph::TYPE_PNG ) - ->setProtocol( Graph::PROTOCOL_ALL ) - ->setCategory( $category ); - } - } - - if( !count( $graphs ) ) - { - $this->addMessage( - "Aggregate graphs have not been configured. Please see this documentation for instructions.", - OSS_Message::ERROR - ); - $this->redirect(''); - } - - $this->view->graphs = $graphs; - - $graphid = $this->getParam( 'graph', 0 ); - if( !isset( $graphs[ $graphid ] ) ) - $graphid = 0; - - $this->view->graphid = $graphid; - $this->view->graph = $graphs[$graphid]; - - $this->setPeriod(); - } - - public function trunksAction() - { - if( !is_array( config('grapher.backends.mrtg.trunks') ) || !count( config('grapher.backends.mrtg.trunks') ) ) { - $this->addMessage( - "Trunk graphs have not been configured. Please see this documentation for instructions.", - OSS_Message::ERROR - ); - $this->redirect(''); - } - - // get the available graphs - foreach( config('grapher.backends.mrtg.trunks') as $g ) { - $ixpid = $g['ixpid']; - $images[] = $g['name']; - $graphs[$g['name']] = $g['title']; - } - $this->view->graphs = $graphs; - - $this->setPeriod(); - - $grapher = App::make('IXP\Services\Grapher'); - - $namereq = $this->getParam( 'trunk', $images[0] ); - if( !in_array( $namereq, $images ) ) - $namereq = $images[0]; - $this->view->namereq = $namereq; - $this->view->graph = $grapher->trunk( $namereq )->setType( Graph::TYPE_PNG ) - ->setProtocol( Graph::PROTOCOL_ALL )->setCategory( Graph::CATEGORY_BITS ); - } - - public function switchesAction() - { - $eSwitches = $this->getD2EM()->getRepository( '\\Entities\\Switcher' )->getAndCache( true, \Entities\Switcher::TYPE_SWITCH ); - $grapher = App::make('IXP\Services\Grapher'); - $category = $this->setCategory( 'category', true ); - - $switches = []; - foreach( $eSwitches as $s ) { - $switches[ $s->getId() ] = $grapher->switch( $s )->setType( Graph::TYPE_PNG )->setProtocol( Graph::PROTOCOL_ALL )->setCategory( $category ); - } - - $this->view->switches = $switches; - - $switchid = $this->getParam( 'switch', array_keys( $switches )[0] ); - if( !in_array( $switchid, array_keys( $switches ) ) ) - $switchid = array_keys( $switches )[0]; - - $this->view->switchid = $switchid; - $this->view->graph = $switches[$switchid]; - - $this->setPeriod(); - } - -} diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 8a0a03d5a..24c3a3590 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -85,11 +85,6 @@ public function housingAction() $this->_requireAuth(); } - public function meetingsInstructionsAction() - { - $this->_requireAuth(); - } - public function miscBenefitsAction() { $this->_requireAuth(); diff --git a/application/views/dashboard/index.phtml b/application/views/dashboard/index.phtml index ae6f7488a..75e8848d2 100644 --- a/application/views/dashboard/index.phtml +++ b/application/views/dashboard/index.phtml @@ -4,12 +4,6 @@ {OSS_Message} -{* if $meeting neq false} - {include file="dashboard/popups/meeting.tpl"} -{/if *} - - - {if not $user->getCustomer()->isTypeAssociate()}
- The next INEX members' meeting is scheduled for {$meeting.date|date_format}. - Please click here - for details or let us know if you can make it by choosing an option below. -
-- We will not ask you to RSVP for this meeting again. However, you can always do - this later via the menu option Member Information -> Meetings. -
--
- --The form below allows you to enter some pre-amble to the email detailing -the members' meeting. If you are unsure of how this works, enter some text and send the mail -which, by default, only sends it to yourself. -
- -
-When you're happy with the result, you can send it to {$options.mailinglists.members.email}
.
-
- Other meeting content also includes: -
- -- - Please RSVP for this meeting: - {config( 'identity.rsvpemail' )} - -
- {/if} - {* if not $simple and $smarty.now < $e->getDate()->format( 'U' ) and $user->getPrivs() eq 1} -- You have already RSVP'd for this meeting and told us that you will - {if $user->getPreference( 'meeting.attending.'|cat:$e->getId() ) eq 'NOT_ATTENDING'}not{/if} - be attending. Please email - {mailto text=$config.meeting.rsvp_to_name address=$config.meeting.rsvp_to_email} - directly to change this. -
- {else} -- Please RSVP for this meeting: - - -
- {/if} -- Other meeting content also includes: -
- --
- -- - This is public list of INEX Members' Meetings. INEX members should log into the IXP Manager - where they can download presentations, view recorded presentations and access speaker contact - details. - -
- -{tmplinclude file='meeting/core.phtml'} - diff --git a/application/views/meeting/simple2.phtml b/application/views/meeting/simple2.phtml deleted file mode 100644 index cf6bf6ef8..000000000 --- a/application/views/meeting/simple2.phtml +++ /dev/null @@ -1,65 +0,0 @@ -{if not isset( $limit ) or not $limit} -- - This is public list of INEX Members' Meetings. INEX members should log into the IXP Manager - where they can download presentations and view recorded presentations that were requested - to not be made public as well as access speaker contact details. - -
-{/if} - - -{foreach from=$entries item=e} - -- Other meeting content also includes: -
- --You can view how the meeting entries look by accessing the meeting page via either of -Admin -> Meetings -> Member View or Member Information -> Meetings. -
- --The general layout of a meeting entry is shown below. In square brackets I have identified the -entires required in the Add New meeting form to show how and where they are used. -
- -[Preamble]
- -- List of Presentations -
- -- Other meeting content also includes: -
- -- List of Other Presentations -
- -[Postamble]
- --Note that [Date] should be selected from the pop up and is entered as YYYY-MM-DD but -is formatted on the page to something such as: Thursday, June 24, 2010. -
- --When entering the venue, note that it will be preseeded by In. -
- --Look at existing entries as an example. To see the form for an existing entry, right -click on its table row and select Edit. -
- - - --Note the following: -
- -http://www.inex.ie/
), the company name will link to the company site; -Again, the best way to fully understand this is to look at entries for existing presentations. -
- - --Members can view meeting details including links to presentations, videos and speaker email addresses through the IXP Manager at -Member Information -> Meetings. This page is automatically generated -based on the entries above. -
- - - -
-There is a publically access HTML feed of the meetings at https://www.inex.ie/ixp/meeting/simple.
-This feed is then included in an iframe
on the main INEX website at https://www.inex.ie/media/meetings-public.
-Again, this page is automatically generated from the entries above but links to presentations, video and email addresses of speakers are not included.
-
-One is often required to send information of a meeting to someone by email. There is now an email composition feature available which will also -automatically generate the email content based on the entries above. In the Admin -> Meetings -> Add / Edit section, -right click on the meeting you wish to compose a mail about and select Compose mail for this meeting.... -
- - - -{tmplinclude file="footer.phtml"} diff --git a/config/ixp_fe.php b/config/ixp_fe.php index 592880073..b864d0dfc 100644 --- a/config/ixp_fe.php +++ b/config/ixp_fe.php @@ -57,7 +57,6 @@ 'cust-kit' => env( 'IXP_FE_FRONTEND_DISABLED_CUSTKIT', false ), 'logo' => env( 'IXP_FE_FRONTEND_DISABLED_LOGO', true ), 'lg' => env( 'IXP_FE_FRONTEND_DISABLED_LOOKING_GLASS', true ), - 'meeting' => env( 'IXP_FE_FRONTEND_DISABLED_MEETING', true ), 'net-info' => env( 'IXP_FE_FRONTEND_DISABLED_NETINFO', true ), 'rs-prefixes' => env( 'IXP_FE_FRONTEND_DISABLED_RS_PREFIXES', false ), ], diff --git a/config/ixp_tools.php.dist b/config/ixp_tools.php.dist index 6a5d48f6e..764c21112 100644 --- a/config/ixp_tools.php.dist +++ b/config/ixp_tools.php.dist @@ -56,17 +56,6 @@ return [ // %ASN% is replaced with the customer's ASN 'peeringdb_url' => "https://www.peeringdb.com/view.php?asn=%ASN%", - //;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - // - // Meeting RSVP Handler - // - // Members can RSVP for meetings via IXP Manager but this is currently - // broken and unlikely to be rekindled. - 'meeting' => [ - 'rsvp_to_email' => "rsvp@example.com", - 'rsvp_to_name' => "Person Who Looks After This Stuff" - ], - //;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; // Billing updates notifications // diff --git a/database/Entities/Meeting.php b/database/Entities/Meeting.php deleted file mode 100644 index 00a830ad6..000000000 --- a/database/Entities/Meeting.php +++ /dev/null @@ -1,380 +0,0 @@ -MeetingItems = new \Doctrine\Common\Collections\ArrayCollection(); - } - - /** - * Set title - * - * @param string $title - * @return Meeting - */ - public function setTitle($title) - { - $this->title = $title; - - return $this; - } - - /** - * Get title - * - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Set before_text - * - * @param string $beforeText - * @return Meeting - */ - public function setBeforeText($beforeText) - { - $this->before_text = $beforeText; - - return $this; - } - - /** - * Get before_text - * - * @return string - */ - public function getBeforeText() - { - return $this->before_text; - } - - /** - * Set after_text - * - * @param string $afterText - * @return Meeting - */ - public function setAfterText($afterText) - { - $this->after_text = $afterText; - - return $this; - } - - /** - * Get after_text - * - * @return string - */ - public function getAfterText() - { - return $this->after_text; - } - - /** - * Set date - * - * @param \DateTime $date - * @return Meeting - */ - public function setDate($date) - { - $this->date = $date; - - return $this; - } - - /** - * Get date - * - * @return \DateTime - */ - public function getDate() - { - return $this->date; - } - - /** - * Set time - * - * @param \DateTime $time - * @return Meeting - */ - public function setTime($time) - { - $this->time = $time; - - return $this; - } - - /** - * Get time - * - * @return \DateTime - */ - public function getTime() - { - return $this->time; - } - - /** - * Set venue - * - * @param string $venue - * @return Meeting - */ - public function setVenue($venue) - { - $this->venue = $venue; - - return $this; - } - - /** - * Get venue - * - * @return string - */ - public function getVenue() - { - return $this->venue; - } - - /** - * Set venue_url - * - * @param string $venueUrl - * @return Meeting - */ - public function setVenueUrl($venueUrl) - { - $this->venue_url = $venueUrl; - - return $this; - } - - /** - * Get venue_url - * - * @return string - */ - public function getVenueUrl() - { - return $this->venue_url; - } - - /** - * Set created_at - * - * @param \DateTime $createdAt - * @return Meeting - */ - public function setCreatedAt($createdAt) - { - $this->created_at = $createdAt; - - return $this; - } - - /** - * Get created_at - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->created_at; - } - - /** - * Set updated_by - * - * @param integer $updatedBy - * @return Meeting - */ - public function setUpdatedBy($updatedBy) - { - $this->updated_by = $updatedBy; - - return $this; - } - - /** - * Get updated_by - * - * @return integer - */ - public function getUpdatedBy() - { - return $this->updated_by; - } - - /** - * Set updated_at - * - * @param \DateTime $updatedAt - * @return Meeting - */ - public function setUpdatedAt($updatedAt) - { - $this->updated_at = $updatedAt; - - return $this; - } - - /** - * Get updated_at - * - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->updated_at; - } - - /** - * Get id - * - * @return integer - */ - public function getId() - { - return $this->id; - } - - /** - * Add MeetingItems - * - * @param Entities\MeetingItem $meetingItems - * @return Meeting - */ - public function addMeetingItem(\Entities\MeetingItem $meetingItems) - { - $this->MeetingItems[] = $meetingItems; - - return $this; - } - - /** - * Remove MeetingItems - * - * @param Entities\MeetingItem $meetingItems - */ - public function removeMeetingItem(\Entities\MeetingItem $meetingItems) - { - $this->MeetingItems->removeElement($meetingItems); - } - - /** - * Get MeetingItems - * - * @return Doctrine\Common\Collections\Collection - */ - public function getMeetingItems() - { - return $this->MeetingItems; - } - - /** - * Set CreatedBy - * - * @param Entities\User $createdBy - * @return Meeting - */ - public function setCreatedBy(\Entities\User $createdBy = null) - { - $this->CreatedBy = $createdBy; - - return $this; - } - - /** - * Get CreatedBy - * - * @return Entities\User - */ - public function getCreatedBy() - { - return $this->CreatedBy; - } -} diff --git a/database/Entities/MeetingItem.php b/database/Entities/MeetingItem.php deleted file mode 100644 index e0017a273..000000000 --- a/database/Entities/MeetingItem.php +++ /dev/null @@ -1,480 +0,0 @@ -title = $title; - - return $this; - } - - /** - * Get title - * - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Set name - * - * @param string $name - * @return MeetingItem - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * Get name - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Set role - * - * @param string $role - * @return MeetingItem - */ - public function setRole($role) - { - $this->role = $role; - - return $this; - } - - /** - * Get role - * - * @return string - */ - public function getRole() - { - return $this->role; - } - - /** - * Set email - * - * @param string $email - * @return MeetingItem - */ - public function setEmail($email) - { - $this->email = $email; - - return $this; - } - - /** - * Get email - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Set company - * - * @param string $company - * @return MeetingItem - */ - public function setCompany($company) - { - $this->company = $company; - - return $this; - } - - /** - * Get company - * - * @return string - */ - public function getCompany() - { - return $this->company; - } - - /** - * Set company_url - * - * @param string $companyUrl - * @return MeetingItem - */ - public function setCompanyUrl($companyUrl) - { - $this->company_url = $companyUrl; - - return $this; - } - - /** - * Get company_url - * - * @return string - */ - public function getCompanyUrl() - { - return $this->company_url; - } - - /** - * Set summary - * - * @param string $summary - * @return MeetingItem - */ - public function setSummary($summary) - { - $this->summary = $summary; - - return $this; - } - - /** - * Get summary - * - * @return string - */ - public function getSummary() - { - return $this->summary; - } - - /** - * Set presentation - * - * @param string $presentation - * @return MeetingItem - */ - public function setPresentation($presentation) - { - $this->presentation = $presentation; - - return $this; - } - - /** - * Get presentation - * - * @return string - */ - public function getPresentation() - { - return $this->presentation; - } - - /** - * Set filename - * - * @param string $filename - * @return MeetingItem - */ - public function setFilename($filename) - { - $this->filename = $filename; - - return $this; - } - - /** - * Get filename - * - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * Set video_url - * - * @param string $videoUrl - * @return MeetingItem - */ - public function setVideoUrl($videoUrl) - { - $this->video_url = $videoUrl; - - return $this; - } - - /** - * Get video_url - * - * @return string - */ - public function getVideoUrl() - { - return $this->video_url; - } - - /** - * Set other_content - * - * @param boolean $otherContent - * @return MeetingItem - */ - public function setOtherContent($otherContent) - { - $this->other_content = $otherContent; - - return $this; - } - - /** - * Get other_content - * - * @return boolean - */ - public function getOtherContent() - { - return $this->other_content; - } - - /** - * Set created_by - * - * @param integer $createdBy - * @return MeetingItem - */ - public function setCreatedBy($createdBy) - { - $this->created_by = $createdBy; - - return $this; - } - - /** - * Get created_by - * - * @return integer - */ - public function getCreatedBy() - { - return $this->created_by; - } - - /** - * Set created_at - * - * @param \DateTime $createdAt - * @return MeetingItem - */ - public function setCreatedAt($createdAt) - { - $this->created_at = $createdAt; - - return $this; - } - - /** - * Get created_at - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->created_at; - } - - /** - * Set updated_by - * - * @param integer $updatedBy - * @return MeetingItem - */ - public function setUpdatedBy($updatedBy) - { - $this->updated_by = $updatedBy; - - return $this; - } - - /** - * Get updated_by - * - * @return integer - */ - public function getUpdatedBy() - { - return $this->updated_by; - } - - /** - * Get id - * - * @return integer - */ - public function getId() - { - return $this->id; - } - - /** - * Set Meeting - * - * @param Entities\Meeting $meeting - * @return MeetingItem - */ - public function setMeeting(\Entities\Meeting $meeting = null) - { - $this->Meeting = $meeting; - - return $this; - } - - /** - * Get Meeting - * - * @return Entities\Meeting - */ - public function getMeeting() - { - return $this->Meeting; - } - /** - * @var \DateTime $updated_at - */ - protected $updated_at; - - - /** - * Set updated_at - * - * @param \DateTime $updatedAt - * @return MeetingItem - */ - public function setUpdatedAt($updatedAt) - { - $this->updated_at = $updatedAt; - - return $this; - } - - /** - * Get updated_at - * - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->updated_at; - } -} diff --git a/database/Entities/User.php b/database/Entities/User.php index c0b7a79f3..e7201c7c1 100644 --- a/database/Entities/User.php +++ b/database/Entities/User.php @@ -500,47 +500,6 @@ public function removeChildren(\Entities\User $children) $this->Children->removeElement($children); } - /** - * @var \Doctrine\Common\Collections\ArrayCollection - */ - protected $Meetings; - - - /** - * Add Meetings - * - * @param Entities\Meeting $meetings - * @return User - */ - public function addMeeting(\Entities\Meeting $meetings) - { - $this->Meetings[] = $meetings; - - return $this; - } - - /** - * Remove Meetings - * - * @param Entities\Meeting $meetings - */ - public function removeMeeting(\Entities\Meeting $meetings) - { - $this->Meetings->removeElement($meetings); - } - - /** - * Get Meetings - * - * @return Doctrine\Common\Collections\Collection - */ - public function getMeetings() - { - return $this->Meetings; - } - /** - * @var \Entities\Contact - */ protected $Contact; diff --git a/database/IXP-Manager.ormdesigner2 b/database/IXP-Manager.ormdesigner2 index afc3dcb78..a0d696036 100755 --- a/database/IXP-Manager.ormdesigner2 +++ b/database/IXP-Manager.ormdesigner2 @@ -870,55 +870,6 @@t |