Advertisement
Guest User

Untitled

a guest
Jan 13th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 84.29 KB | None | 0 0
  1. diff --git a/application/admin/index/controllers/SessionsController.php b/application/admin/index/controllers/SessionsController.php
  2. index 135110c..ad72250 100644
  3. --- a/application/admin/index/controllers/SessionsController.php
  4. +++ b/application/admin/index/controllers/SessionsController.php
  5. @@ -77,6 +77,7 @@ class SessionsController extends IP_Controller_EventAction {
  6.                 $obj->groupIDs      = $form->getElement('groupIDs')->getValue();
  7.                 $obj->title         = $form->getElement('title')->getValue();
  8.                 $obj->number        = $form->getElement('number')->getValue();
  9. +               $obj->points        = $form->getElement('points')->getValue();
  10.                 $obj->maxAttendance = $form->getElement('maxAttendance')->getValue();
  11.                 $obj->typeID        = ($form->getElement('typeID')->getValue()  != '')        ? $form->getElement('typeID')->getValue()        : null;
  12.                 $obj->programID     = ($form->getElement('programID')->getValue() != '')      ? $form->getElement('programID')->getValue()     : null;
  13. @@ -518,6 +519,9 @@ class SessionsController extends IP_Controller_EventAction {
  14.                             $obj->title         = $form->getElement('title')->getValue();
  15.                         if(!$notFullAccess || $obj->canWrite('number'))
  16.                             $obj->number            = $form->getElement('number')->getValue();
  17. +                       if(!$notFullAccess || $obj->canWrite('points')) {
  18. +                           $obj->points            = $form->getElement('points')->getValue();
  19. +                       }  
  20.                         if(!$notFullAccess || $obj->canWrite('maxAttendance')) {
  21.                             $obj->maxAttendance = $form->getElement('maxAttendance')->getValue();
  22.                         }
  23. @@ -673,6 +677,9 @@ class SessionsController extends IP_Controller_EventAction {
  24.             $form->getElement('title')->setValue($obj->title);
  25.             if($form->getElement('number'))
  26.             $form->getElement('number')->setValue($obj->number);
  27. +           if($form->getElement('points')) {
  28. +               $form->getElement('points')->setValue($obj->points);
  29. +           }
  30.             if($form->getElement('maxAttendance')) {
  31.                 $form->getElement('maxAttendance')->setValue($obj->maxAttendance);
  32.             }
  33. @@ -1778,6 +1785,13 @@ class SessionsController extends IP_Controller_EventAction {
  34.         if($mode == 'readonly')
  35.             $e->setAttrib('disabled','disabled');
  36.         $f->addElement($e);
  37. +      
  38. +       $e = $f->createElement('text', 'points');
  39. +       $e->setLabel(IP::_('Sessions::LABEL_POINTS'));
  40. +       if($mode == 'readonly') {
  41. +           $e->setAttrib('disabled','disabled');
  42. +       }
  43. +       $f->addElement($e);
  44.  
  45.         $e = $f->createElement('text', 'number');
  46.         $e->setLabel(IP::_('Sessions::LABEL_NUMBER'));
  47. diff --git a/application/admin/index/scripts/sessions/add.phtml b/application/admin/index/scripts/sessions/add.phtml
  48. index 32def06..8c83acc 100644
  49. --- a/application/admin/index/scripts/sessions/add.phtml
  50. +++ b/application/admin/index/scripts/sessions/add.phtml
  51. @@ -31,6 +31,7 @@ $this->ip()->startContainer();
  52.              $this->ip()->endElement();
  53.             echo $this->form->getElement('maxAttendance');
  54.             echo $this->form->getElement('typeID');
  55. +           echo $this->form->getElement('points');
  56.             echo $this->form->getElement('exhibitorID');
  57.             echo $this->form->getElement('publish');
  58.            
  59. @@ -52,6 +53,11 @@ $this->ip()->startContainer();
  60.             echo $this->form->getElement('mentorUserID');
  61.             echo $this->form->getElement('groupIDs');
  62.            
  63. +           foreach (IP::getInstance()->getEvent()->getTableObject('SessionTypes')->fetchAll() as $type)
  64. +            {
  65. +                echo $this->form->getElement('sessionType_'.$type->recordID);
  66. +            }
  67. +          
  68.         $this->ip()->endGroup();
  69.     $this->ip()->endRightContainer();
  70.  
  71. @@ -216,12 +222,25 @@ function checkSponsorSelect(selectValue) {
  72.         jQuery('#exhibitorID').attr("disabled", true);
  73.     }
  74.  }
  75. +function togglePointsField(selectValue) {
  76. +    var systemType = jQuery("#sessionType_"+selectValue).val();
  77. +   if(systemType != "1"){
  78. +       jQuery("#points").hide();
  79. +       jQuery('[for=points]').hide();
  80. +       jQuery("#points").val(0);
  81. +   } else {
  82. +       jQuery("#points").show();
  83. +       jQuery('[for=points]').show();
  84. +   }
  85. +}
  86.  function onSessionTypeSelectChange(target) {
  87.     checkSponsorSelect(target.value);
  88. +   togglePointsField(target.value);
  89.  }
  90.  
  91.  jQuery(document).ready(function() {
  92.     checkSponsorSelect(jQuery('#typeID').val());
  93. +   togglePointsField(jQuery('#typeID').val());
  94.     jQuery('#date').bind('change', checkDate);
  95.     jQuery('#startTime').bind('change', checkRooms);
  96.     jQuery('#duration').bind('change', checkRooms);
  97. diff --git a/application/admin/index/scripts/sessions/edit.phtml b/application/admin/index/scripts/sessions/edit.phtml
  98. index 0121b2e..43acbfb 100644
  99. --- a/application/admin/index/scripts/sessions/edit.phtml
  100. +++ b/application/admin/index/scripts/sessions/edit.phtml
  101. @@ -55,6 +55,7 @@ $this->ip()->startContainer();
  102.              $this->ip()->endElement();
  103.             echo $this->form->getElement('maxAttendance');
  104.             echo $this->form->getElement('typeID');
  105. +           echo $this->form->getElement('points');
  106.             echo $this->form->getElement('exhibitorID');
  107.             echo $this->form->getElement('status');
  108.             echo $this->form->getElement('publish');
  109. @@ -611,6 +612,18 @@ function checkSponsorSelect(selectValue) {
  110.     }
  111.  }
  112.  
  113. +function togglePointsField(selectValue) {
  114. +    var systemType = jQuery("#sessionType_"+selectValue).val();
  115. +   if(systemType != "1"){
  116. +       jQuery("#points").hide();
  117. +       jQuery('[for=points]').hide();
  118. +       jQuery("#points").val(0);
  119. +   } else {
  120. +       jQuery("#points").show();
  121. +       jQuery('[for=points]').show();
  122. +   }
  123. +}
  124. +
  125.  function onSessionTypeSelectChange(target){
  126.     var recordID = jQuery("#typeID option:selected").val();
  127.      var systemType = jQuery("#sessionType_"+recordID).val();
  128. @@ -621,10 +634,12 @@ function onSessionTypeSelectChange(target){
  129.     }
  130.  
  131.     checkSponsorSelect(target.value);
  132. +   togglePointsField(target.value);
  133.  }
  134.  
  135.  jQuery(document).ready(function() {
  136.     checkSponsorSelect(jQuery('#typeID').val());
  137. +   togglePointsField(jQuery('#typeID').val());
  138.     jQuery('#date').bind('change', checkDate);
  139.     jQuery('#startTime').bind('change', checkRooms);
  140.     jQuery('#duration').bind('change', checkRooms);
  141. diff --git a/application/public/index/controllers/XmlController.php b/application/public/index/controllers/XmlController.php
  142. index c60612b..fb83cf8 100644
  143. --- a/application/public/index/controllers/XmlController.php
  144. +++ b/application/public/index/controllers/XmlController.php
  145. @@ -11,27 +11,26 @@
  146.   */
  147.  
  148.  class XmlController extends IP_Controller_EventAction {
  149. +  
  150.      protected $_profileAdditionalQuestions = array();
  151. -
  152. +    
  153.      protected function _getProfileAdditionalQuestions()
  154.      {
  155.          if (!$this->_profileAdditionalQuestions) {
  156.              $this->_profileAdditionalQuestions = $this->getEvent()->getTableObject('AdditionalQuestionConfigs')->fetchAll('objectType = ' . '"Profiles"');
  157.          }
  158. -
  159. +        
  160.          return $this->_profileAdditionalQuestions;
  161.      }
  162. -
  163. -    public function getPublicActions()
  164. -    {
  165. -        return array(
  166. -            'authentication', 'profiles', 'tracks',
  167. -            'ancillarysponsorships', 'packages', 'booths',
  168. -            'golfsponsorpackages', 'event', 'refreshcache',
  169. -            'golfpsonsorancillarysponsorships', 'xml',
  170. -        );
  171. +    
  172. +    
  173. +   public function getPublicActions() {
  174. +       return array(   'authentication', 'profiles', 'registrations', 'tracks', 'sessions', 'speakers',
  175. +                       'exhibitors', 'ancillarysponsorships', 'packages', 'booths',
  176. +                       'golfsponsors', 'golfpsonsorancillarysponsorships', 'golfsponsorpackages', 'event',
  177. +                       'refreshcache');
  178.     }
  179. -
  180. +  
  181.     protected function isRequest() {
  182.         if ($this->_request->isPost())
  183.             return true;
  184. @@ -249,7 +248,54 @@ class XmlController extends IP_Controller_EventAction {
  185.         $element->appendChild($additionalQuestionsElement);
  186.        
  187.     }
  188. -
  189. +  
  190. +   public function registrationsAction() {
  191. +       if ($this->isRequest()) {
  192. +           Zend_Controller_Front::getInstance()->getResponse()->setHeader('Content-Type', 'text/xml');
  193. +           $authProfile = $this->authenticationAction();
  194. +           $this->_helper->layout->disableLayout();
  195. +                  
  196. +           if($authProfile == TRUE) {
  197. +               try {
  198. +                  
  199. +                   /**
  200. +                    * Note there is not currently a way to get all registrations from the feed at once.
  201. +                    * There is also no way to change the number of registrations displayed.
  202. +                    * As handled by the controller, the feed delivers up to 1000 registrations,
  203. +                    * using pagination controls to handle the offset multiplier.
  204. +                    */
  205. +                  
  206. +                   $options = array();
  207. +                  
  208. +                   $optionKeys = array('regStatus', 'modifiedDate', 'page');
  209. +                              
  210. +                    foreach ($optionKeys as $option)
  211. +                    {
  212. +                        if ($param = $this->_getParam($option)) {
  213. +                            $options[$option] = $param;
  214. +                        }
  215. +                    }
  216. +                    
  217. +                    $service = new IP_Mapper_Service_RegistrationsXmlFeed($options);
  218. +                    $this->view->XML = $service->execute();
  219. +               } catch (IP_Controller_Action_ErrorException $me) {
  220. +                   $message = $me->getMessage();
  221. +                   if (!empty($message)) {
  222. +                       $this->_helper->MessageBroker->error($message);
  223. +                   }
  224. +               } catch (Exception $e) {
  225. +                   throw $e;
  226. +               }
  227. +           } else {
  228. +               return FALSE;
  229. +           }
  230. +       } else {
  231. +           $form = $this->getTestForm();
  232. +           echo $form;
  233. +           return FALSE;
  234. +       }
  235. +   }
  236. +  
  237.      public function refreshcacheAction() {
  238.         if ($this->isRequest()) {
  239.             Zend_Controller_Front::getInstance()->getResponse()->setHeader('Content-Type', 'text/xml');
  240. @@ -393,7 +439,7 @@ class XmlController extends IP_Controller_EventAction {
  241.         }
  242.     }
  243.    
  244. -   protected function _sessionsDeprecated() {
  245. +   public function sessionsAction() {
  246.         if ($this->isRequest()) {
  247.             Zend_Controller_Front::getInstance()->getResponse()->setHeader('Content-Type', 'text/xml');
  248.             $this->_helper->layout->disableLayout();
  249. @@ -623,8 +669,8 @@ class XmlController extends IP_Controller_EventAction {
  250.             return FALSE;
  251.         }
  252.     }
  253. -
  254. -   protected function _speakersDeprecated() {
  255. +  
  256. +   public function speakersAction() {
  257.         if ($this->isRequest()) {
  258.             Zend_Controller_Front::getInstance()->getResponse()->setHeader('Content-Type', 'text/xml');
  259.             $this->_helper->layout->disableLayout();
  260. @@ -871,8 +917,8 @@ class XmlController extends IP_Controller_EventAction {
  261.          return $questionArray;
  262.  
  263.      }
  264. -
  265. -   protected function _exhibitorsDeprecated() {
  266. +  
  267. +   public function exhibitorsAction() {
  268.         if ($this->isRequest()) {
  269.             Zend_Controller_Front::getInstance()->getResponse()->setHeader('Content-Type', 'text/xml');
  270.             $this->_helper->layout->disableLayout();
  271. @@ -1481,73 +1527,4 @@ $f = '
  272.     public function isGolfObject() {
  273.         return (bool)$this->_getParam('golfObject', false);
  274.     }
  275. -
  276. -    /**
  277. -     * Routes.ini uses this action to generate an XML feed from the Mapper Service Classes
  278. -     *
  279. -     * @author Joel Ehrhard <jehrhard@aetherquest.com>
  280. -     */
  281. -    public function xmlAction()
  282. -    {
  283. -        $deprecated = (bool)$this->_getParam('deprecated', false);
  284. -        $feed = $this->_getParam('feed', null);
  285. -        if ($deprecated) {
  286. -            $this->_buildDeprecatedXmlFeed($feed);
  287. -        } else {
  288. -            $optionKeys = $this->_getParam('optkeys', array());
  289. -            $this->_buildXmlFeed($feed, $optionKeys);
  290. -        }
  291. -    }
  292. -
  293. -    protected function _buildXmlFeed($feed = null, $optionKeys = array())
  294. -    {
  295. -        if ($this->isRequest()) {
  296. -            Zend_Controller_Front::getInstance()->getResponse()->setHeader('Content-Type', 'text/xml');
  297. -            $authProfile = $this->authenticationAction();
  298. -            $this->_helper->layout->disableLayout();
  299. -
  300. -            if($authProfile == true) {
  301. -                try {
  302. -                    if ($feed === null || !class_exists($mapperService = 'IP_Mapper_Service_' . $feed)) {
  303. -                        throw new IP_Controller_Action_ErrorException('ERROR: No Valid Feed Provided');
  304. -                    }
  305. -                    $options = array();
  306. -                    foreach ($optionKeys as $option) {
  307. -                        if (($param = $this->_getParam($option, false)) !== false)
  308. -                            $options[$option] = $param;
  309. -                    }
  310. -                    $service = new $mapperService($options);
  311. -                    $this->view->XML = $service->execute();
  312. -                } catch (IP_Controller_Action_ErrorException $me) {
  313. -                    $message = $me->getMessage();
  314. -                    if (!empty($message)) {
  315. -                        $this->_helper->MessageBroker->error($message);
  316. -                    }
  317. -                } catch (Exception $e) {
  318. -                    throw $e;
  319. -                }
  320. -            } else {
  321. -                return false;
  322. -            }
  323. -        } else {
  324. -            echo $this->getAuthenticateTestForm();
  325. -            return false;
  326. -        }
  327. -    }
  328. -
  329. -    protected function _buildDeprecatedXmlFeed($feed = null)
  330. -    {
  331. -        try {
  332. -            if ($feed === null || !method_exists($this, '_' . $feed . 'Deprecated'))
  333. -                throw new IP_Controller_Action_ErrorException('ERROR: Invalid Deprecated Xml Feed Provided');
  334. -            $this->{'_' . $feed . 'Deprecated'}();
  335. -        } catch (IP_Controller_Action_ErrorException $me) {
  336. -            $message = $me->getMessage();
  337. -            if (!empty($message)) {
  338. -                $this->_helper->MessageBroker->error($message);
  339. -            }
  340. -        } catch (Exception $e) {
  341. -            throw $e;
  342. -        }
  343. -    }
  344. -}
  345. \ No newline at end of file
  346. +}
  347. diff --git a/application/public/index/scripts/xml/exhibitors.phtml b/application/public/index/scripts/xml/exhibitors.phtml
  348. new file mode 100644
  349. index 0000000..e669ffe
  350. --- /dev/null
  351. +++ b/application/public/index/scripts/xml/exhibitors.phtml
  352. @@ -0,0 +1,11 @@
  353. +<?php
  354. +if($this->XML != NULL) {
  355. +   if(is_array($this->XML)) {
  356. +       foreach($this->XML as $xml) {
  357. +           echo $xml;
  358. +       }      
  359. +   } else {
  360. +       echo $this->XML;
  361. +   }
  362. +}
  363. +?>
  364. \ No newline at end of file
  365. diff --git a/application/public/index/scripts/xml/registrations.phtml b/application/public/index/scripts/xml/registrations.phtml
  366. new file mode 100644
  367. index 0000000..e669ffe
  368. --- /dev/null
  369. +++ b/application/public/index/scripts/xml/registrations.phtml
  370. @@ -0,0 +1,11 @@
  371. +<?php
  372. +if($this->XML != NULL) {
  373. +   if(is_array($this->XML)) {
  374. +       foreach($this->XML as $xml) {
  375. +           echo $xml;
  376. +       }      
  377. +   } else {
  378. +       echo $this->XML;
  379. +   }
  380. +}
  381. +?>
  382. \ No newline at end of file
  383. diff --git a/application/public/index/scripts/xml/sessions.phtml b/application/public/index/scripts/xml/sessions.phtml
  384. new file mode 100644
  385. index 0000000..e669ffe
  386. --- /dev/null
  387. +++ b/application/public/index/scripts/xml/sessions.phtml
  388. @@ -0,0 +1,11 @@
  389. +<?php
  390. +if($this->XML != NULL) {
  391. +   if(is_array($this->XML)) {
  392. +       foreach($this->XML as $xml) {
  393. +           echo $xml;
  394. +       }      
  395. +   } else {
  396. +       echo $this->XML;
  397. +   }
  398. +}
  399. +?>
  400. \ No newline at end of file
  401. diff --git a/application/public/index/scripts/xml/speakers.phtml b/application/public/index/scripts/xml/speakers.phtml
  402. new file mode 100644
  403. index 0000000..e669ffe
  404. --- /dev/null
  405. +++ b/application/public/index/scripts/xml/speakers.phtml
  406. @@ -0,0 +1,11 @@
  407. +<?php
  408. +if($this->XML != NULL) {
  409. +   if(is_array($this->XML)) {
  410. +       foreach($this->XML as $xml) {
  411. +           echo $xml;
  412. +       }      
  413. +   } else {
  414. +       echo $this->XML;
  415. +   }
  416. +}
  417. +?>
  418. \ No newline at end of file
  419. diff --git a/application/public/routes.ini b/application/public/routes.ini
  420. index d7ce3d6..d025ccd 100644
  421. --- a/application/public/routes.ini
  422. +++ b/application/public/routes.ini
  423. @@ -1,101 +1,50 @@
  424.  [production]
  425. -
  426. -; Registration Invitation Route
  427.  routes.regsInvitation.route = "registrations/invitation/:invitation"
  428.  routes.regsInvitation.module = "index"
  429.  routes.regsInvitation.controller = "registrations"
  430.  routes.regsInvitation.action = "start"
  431.  
  432. -; Invitation Route
  433.  routes.invitation.route = "invitation/:invitation"
  434.  routes.invitation.module = "index"
  435.  routes.invitation.controller = "registrations"
  436.  routes.invitation.action = "start"
  437.  
  438. -; Login Route
  439.  routes.login.route = "login"
  440.  routes.login.defaults.module = "index"
  441.  routes.login.defaults.controller = "login"
  442.  routes.login.defaults.action = "index"
  443.  
  444. -; Logout Route
  445.  routes.logout.route = "logout"
  446.  routes.logout.defaults.module = "index"
  447.  routes.logout.defaults.controller = "login"
  448.  routes.logout.defaults.action = "logout"
  449.  
  450. -; Session File Route
  451.  routes.sessionfiles.route = "sessionfile/:id"
  452.  routes.sessionfiles.defaults.module = "index"
  453.  routes.sessionfiles.defaults.controller = "index"
  454.  routes.sessionfiles.defaults.action = "sessionfile"
  455.  
  456. -; Golf Sponsor Sponsorship Packages XML Feed
  457. +; Golf Sponsor XML
  458. +
  459.  routes.golfSponsorSponsorshipPackagesXml.route = "xml/golfsponsorpackages"
  460.  routes.golfSponsorSponsorshipPackagesXml.defaults.module = "index"
  461.  routes.golfSponsorSponsorshipPackagesXml.defaults.controller = "xml"
  462.  routes.golfSponsorSponsorshipPackagesXml.defaults.action = "packages"
  463.  routes.golfSponsorSponsorshipPackagesXml.defaults.golfObject = "1"
  464.  
  465. -; Golf Sponsor Ancillary Sponsroships XML Feed
  466.  routes.golfSponsorAncillarySponsorshipsXml.route = "xml/golfsponsorancillarysponsorships"
  467.  routes.golfSponsorAncillarySponsorshipsXml.defaults.module = "index"
  468.  routes.golfSponsorAncillarySponsorshipsXml.defaults.controller = "xml"
  469.  routes.golfSponsorAncillarySponsorshipsXml.defaults.action = "ancillarysponsorships"
  470.  routes.golfSponsorAncillarySponsorshipsXml.defaults.golfObject = "1"
  471.  
  472. -; Buyer Selection
  473. +routes.golfSponsorsXml.route = "xml/golfsponsors"
  474. +routes.golfSponsorsXml.defaults.module = "index"
  475. +routes.golfSponsorsXml.defaults.controller = "xml"
  476. +routes.golfSponsorsXml.defaults.action = "exhibitors"
  477. +routes.golfSponsorsXml.defaults.golfObject = "1"
  478. +
  479.  routes.buyerselection.route = 'buyerselection'
  480.  routes.buyerselection.defaults.module = 'index'
  481.  routes.buyerselection.defaults.controller = 'buyerselection'
  482. -routes.buyerselection.defaults.action = 'index'
  483. -
  484. -; Sessions XML Feed
  485. -routes.sessionsXml.route = "xml/sessions"
  486. -routes.sessionsXml.defaults.module = "index"
  487. -routes.sessionsXml.defaults.controller = "xml"
  488. -routes.sessionsXml.defaults.action = "xml"
  489. -routes.sessionsXml.defaults.feed = "SessionsXmlFeed"
  490. -
  491. -; Exhibitors XML Feed
  492. -routes.exhibitorsXml.route = "xml/exhibitors"
  493. -routes.exhibitorsXml.defaults.module = "index"
  494. -routes.exhibitorsXml.defaults.controller = "xml"
  495. -routes.exhibitorsXml.defaults.action = "xml"
  496. -routes.exhibitorsXml.defaults.feed = "ExhibitorsXmlFeed"
  497. -routes.exhibitorsXml.defaults.optkeys[] = "isGolf"
  498. -routes.exhibitorsXml.defaults.isGolf = "0"
  499. -
  500. -; Golf Sponsors XML Feed
  501. -routes.exhibitorsXml.route = "xml/golfsponsors"
  502. -routes.exhibitorsXml.defaults.module = "index"
  503. -routes.exhibitorsXml.defaults.controller = "xml"
  504. -routes.exhibitorsXml.defaults.action = "xml"
  505. -routes.exhibitorsXml.defaults.feed = "ExhibitorsXmlFeed"
  506. -routes.exhibitorsXml.defaults.optkeys[] = "isGolf"
  507. -routes.exhibitorsXml.defaults.isGolf = "1"
  508. -
  509. -; Registrations XML Feed
  510. -; Add "/*" if params are passed through url string
  511. -routes.regXml.route = "xml/registrations/*"
  512. -routes.regXml.defaults.module = "index"
  513. -routes.regXml.defaults.controller = "xml"
  514. -routes.regXml.defaults.action = "xml"
  515. -routes.regXml.defaults.feed = "RegistrationsXmlFeed"
  516. -routes.regXml.defaults.optkeys[] = "regStatus"
  517. -routes.regXml.defaults.optkeys[] = "modifiedDate"
  518. -routes.regXml.defaults.optkeys[] = "page"
  519. -
  520. -; Speakers XML Feed
  521. -routes.exhibitorsXml.route = "xml/speakers"
  522. -routes.exhibitorsXml.defaults.module = "index"
  523. -routes.exhibitorsXml.defaults.controller = "xml"
  524. -routes.exhibitorsXml.defaults.action = "xml"
  525. -routes.exhibitorsXml.defaults.feed = "SpeakersXmlFeed"
  526. -
  527. -; Deprecated XML Feeds
  528. -routes.deprecatedXml.route = "xml/deprecated/:feed"
  529. -routes.deprecatedXml.defaults.module = "index"
  530. -routes.deprecatedXml.defaults.controller = "xml"
  531. -routes.deprecatedXml.defaults.action = "xml"
  532. -routes.deprecatedXml.defaults.deprecated = "1"
  533. \ No newline at end of file
  534. +routes.buyerselection.defaults.action = 'index'
  535. \ No newline at end of file
  536. diff --git a/classes/IP/Command/RefreshXml.php b/classes/IP/Command/RefreshXml.php
  537. index c1be858..879b4f2 100644
  538. --- a/classes/IP/Command/RefreshXml.php
  539. +++ b/classes/IP/Command/RefreshXml.php
  540. @@ -23,7 +23,7 @@ class IP_Command_RefreshXml extends IP_Command
  541.     public function run() {
  542.         // Disable notifications that are not vital to saving the records
  543.         IP::getInstance()->isBulkOperation(true);
  544. -       error_reporting(E_ERROR | E_PARSE);
  545. +       error_reporting(E_ERROR | E_PARSE | E_FATAL);
  546.         // Set time limit to unlimited
  547.         set_time_limit(0);
  548.         // Increase memory limit
  549. diff --git a/classes/IP/Db/Table/Abstract.php b/classes/IP/Db/Table/Abstract.php
  550. index 0f9bd54..a56b231 100644
  551. --- a/classes/IP/Db/Table/Abstract.php
  552. +++ b/classes/IP/Db/Table/Abstract.php
  553. @@ -13,6 +13,7 @@ abstract class IP_Db_Table_Abstract extends Zend_Db_Table_Abstract implements IP
  554.     const DATETIME = 'datetime';
  555.     const ENUM = 'enum';
  556.     const DECIMAL = 'decimal';
  557. +   const SMALLINT = 'smallint';
  558.  
  559.     const PARENT_CLASS_COLUMN = 'parentClassColumn';
  560.     const DEPENDENT_SORT = 'dependentSort';
  561. diff --git a/classes/IP/Mapper/Abstract.php b/classes/IP/Mapper/Abstract.php
  562. index 6e66534..a1cbe50 100644
  563. --- a/classes/IP/Mapper/Abstract.php
  564. +++ b/classes/IP/Mapper/Abstract.php
  565. @@ -121,7 +121,7 @@ abstract class IP_Mapper_Abstract
  566.              if(property_exists($instance, $value)) {
  567.                  $returnValue = $this->_mapAttribute($key, $instance, $value);
  568.              } else if ($function != 'get' && method_exists($instance, $function)) {
  569. -                $returnValue = $this->_mapMethod($key, $instance, $function, $value);
  570. +                $returnValue = $this->_mapMethod($key, $instance, $function);
  571.              } else if(substr_count($value, ".") > 0) {
  572.                  $splitValue = explode(".", $value);
  573.                  if($instance->hasReference($splitValue[0]) &&
  574. @@ -131,7 +131,7 @@ abstract class IP_Mapper_Abstract
  575.                      $returnValue = $value;
  576.                  }
  577.              } else if($instance->hasDependents($value) || $instance->hasReference($value)) {                
  578. -                $returnValue = $this->_mapObject($key, $instance->{$value});
  579. +                $returnValue = $this->_mapObject($key, $instance->{$value}, $value);
  580.              } else {
  581.                  $returnValue = $this->_mapString($key, $instance, $value);
  582.              }
  583. diff --git a/classes/IP/Mapper/Service/ExhibitorsXmlFeed.php b/classes/IP/Mapper/Service/ExhibitorsXmlFeed.php
  584. deleted file mode 100644
  585. index fe7566b..0000000
  586. --- a/classes/IP/Mapper/Service/ExhibitorsXmlFeed.php
  587. +++ /dev/null
  588. @@ -1,238 +0,0 @@
  589. -<?php
  590. -
  591. -class IP_Mapper_Service_ExhibitorsXmlFeed extends IP_Mapper_Service_Abstract
  592. -{
  593. -    private $_cache;
  594. -    private $_cacheKey;
  595. -    private $_shouldCache = false;
  596. -    private $_isGolf;
  597. -    public function __construct($options = array(), $event = null)
  598. -    {
  599. -        if ($event) {
  600. -            $this->setEvent($event);
  601. -        }
  602. -        $this->_regTable = $this->getEvent()->getTableObject('Sessions');
  603. -
  604. -        foreach ($options as $option=>$value) {
  605. -            switch ($option) {
  606. -                case 'isGolf':
  607. -                    $this->setGolf($value);
  608. -            }
  609. -        }
  610. -
  611. -        $this->_cache = $this->getEvent()->getCache();
  612. -
  613. -        $this->_cacheKey = 'exb_xml_'.preg_replace('/[^a-zA-Z0-9_]/', '_', http_build_query($options));
  614. -    }
  615. -
  616. -    public function setGolf($isGolf)
  617. -    {
  618. -        if (is_bool($isGolf) || (in_array($isGolf, array(0, '0', 1, '1')))) {
  619. -            $this->_isGolf = (bool)$isGolf;
  620. -        }
  621. -    }
  622. -
  623. -    
  624. -    public function execute()
  625. -    {
  626. -        if ($this->_shouldCache && ($xml = $this->getCachedXml())) {
  627. -            return $xml;
  628. -        }
  629. -        
  630. -        /**
  631. -         * this is where we're going to use the xml saved in the database to generate the feed
  632. -         */
  633. -        
  634. -        $this->_initializeMappables();
  635. -        $event = $this->getEvent();
  636. -        $xmlTable = $event->getTableObject('XmlNodes');
  637. -        
  638. -        $exhibitorsTable = $event->getTableObject((($this->_isGolf) ? 'GolfSponsors' : 'Exhibitors'));
  639. -        $selector = $xmlTable->select()->from(array('xml'=>XmlNodes::TABLE), array('*'), $event->getDatabase())
  640. -                                       ->joinInner(array('ex'=>$exhibitorsTable->getSelectTableName()),
  641. -                                             '(ex.recordID = xml.objectID) AND (objectType = "Exhibitors")',
  642. -                                             array(),
  643. -                                             $event->getDatabase())
  644. -                                       ->where(MyDB::getInstance()->getInClauseAsOr('ex.regStatus', Exhibitors::getValidRegStatuses()))
  645. -                                      ->where('visible = 1')
  646. -                                      ->where('golfObject = ?', $this->_isGolf);
  647. -        $selector->order('objectID');
  648. -       $xmlDocument = new DOMDocument('1.0', 'iso-8859-1');
  649. -        $xmlDocument->formatOutput = TRUE;
  650. -        $exElement = $xmlDocument->createElement((($this->_isGolf) ? 'golfsponsors' : 'exhibitors') . '_response');
  651. -        
  652. -        foreach ($xmlTable->fetchAll($selector) as $node)
  653. -        {
  654. -            $domNode = $node->asDomNode();
  655. -            $newDomNode = $xmlDocument->importNode($domNode, true);
  656. -            $exElement->appendChild($newDomNode);
  657. -         }
  658. -        
  659. -        
  660. -        $xmlDocument->appendChild($exElement);
  661. -        
  662. -        $xml = $xmlDocument->saveXml();
  663. -        $this->setCachedXml($xml);
  664. -        return $xml;
  665. -    }
  666. -    
  667. -    public function getCachedXml()
  668. -    {
  669. -        if ($xmlArray = $this->_cache->load($this->_cacheKey)) {
  670. -            if ($xmlArray['expires'] > time()) {
  671. -                return $xmlArray['xml'];
  672. -            }
  673. -        }
  674. -        
  675. -        return false;
  676. -    }
  677. -    
  678. -    public function mapInstance($instance)
  679. -    {
  680. -        $this->_initializeMappables();
  681. -        
  682. -        $table = $instance->getTable();
  683. -        if (!$table instanceOf IP_Mappable_Interface) {
  684. -            throw new Exception('Instance of '.get_class($instance).' cannot be mapped because its table is not mappable');
  685. -        }
  686. -        
  687. -        $mappableAdapter = IP_Mappable_Adapter_Factory::get($table);
  688. -        $mappableAdapter->setMappable($instance->getTable());
  689. -        $mappableAdapter->setFieldOrderAppend();
  690. -       $xmlMapper = new IP_Mapper_Xml($mappableAdapter);
  691. -       return $xmlMapper->mapInstance($instance);
  692. -        
  693. -    }
  694. -    
  695. -    
  696. -    public function setCachedXml($xml)
  697. -    {
  698. -        $xmlArray = array('xml'=>$xml, 'expires'=>strtotime('+15 minutes'));
  699. -        
  700. -        $this->_cache->save($xmlArray, $this->_cacheKey);
  701. -    }
  702. -    
  703. -    
  704. -    private function _initializeMappables()
  705. -    {
  706. -        $event = $this->getEvent();
  707. -        
  708. -        $exTable = $event->getTableObject((($this->_isGolf) ? 'GolfSponsors' : 'Exhibitors'));
  709. -        $exTableInfo = $exTable->info();
  710. -        foreach ($exTableInfo['dependentTables'] as $dep)
  711. -        {
  712. -            if (!in_array($dep, $this->_exFieldOrder)) {
  713. -                $this->_exExcludedFields[] = $dep;
  714. -            }
  715. -        }
  716. -        
  717. -        foreach ($exTableInfo['referenceMap'] as $referenceKey=>$mapping)
  718. -        {
  719. -            if (!in_array($referenceKey, $this->_exFieldOrder)
  720. -                && $referenceKey != 'Profile') {
  721. -                $this->_exExcludedFields[] = $referenceKey;
  722. -            }
  723. -        }
  724. -
  725. -        $exTable->setExcludedFields($this->_exExcludedFields);
  726. -        $exTable->setColumnAliases($this->_exColumnAliases);
  727. -        $exTable->setFieldOrder($this->_exFieldOrder);
  728. -        $exTable->setExcludeUnorderedFields(true);
  729. -        $profilesTable = $event->getTableObject('Profiles');
  730. -        $profileTableInfo = $profilesTable->info();
  731. -        
  732. -        foreach ($profileTableInfo['dependentTables'] as $dep)
  733. -        {
  734. -            $this->_profileExcludedFields[] = $dep;
  735. -        }
  736. -        
  737. -        foreach ($profileTableInfo['referenceMap'] as $referenceKey=>$mapping)
  738. -        {
  739. -            $this->_profileExcludedFields[] = $referenceKey;
  740. -        }
  741. -
  742. -        $profilesTable->setFieldOrder($this->_profileFieldOrder);
  743. -        $profilesTable->setExcludedFields($this->_profileExcludedFields);
  744. -        $profilesTable->setExcludeUnorderedFields(true);
  745. -
  746. -        $profilesTable->setColumnAliases($this->_profileColumnAliases);
  747. -    }
  748. -
  749. -    private $_exFieldOrder = array('exhibitor_id', 'type', 'confirmation','company', 'address1', 'address2','address3', 'city', 'state',
  750. -                                  'postal_code', 'country', 'industry', 'description','url', 'fax', 'phone', 'PrimaryContact', 'ExhibitorPersonnel',
  751. -                                  'booths', 'sponsorship_packages', 'ancillary_sponsorships', 'AdditionalQuestions');
  752. -    private $_exExcludedFields = array('primaryContactID', 'exhibitorTypeID', 'housingSubblockID', 'visible',
  753. -                                       'invitationHash','invitationStatus', 'notes','totalBalance','totalCollected',
  754. -                                       'balanceBeforeTaxes','vat1Value','vat2Value','vat3Value', 'vat1Collected',
  755. -                                       'vat2Collected','vat3Collected', 'payStatus','regStatus','accessCode',
  756. -                                       'accessCodeDate','cancellationDate','creationDate','modifiedDate','golfObject');
  757. -    private $_exColumnAliases =     array(
  758. -                                       'recordID'                  => 'exhibitor_id',
  759. -                                       'ExhibitorPersonnelForXml'  => 'ExhibitorPersonnel',
  760. -                                       'ExhibitorBoothsForXml'     => 'booths',
  761. -                                       'ExbSpPackagesForXml'       => 'sponsorship_packages',
  762. -                                       'AnsSponsorshipsForXml'     => 'ancillary_sponsorships',
  763. -                                       'AdditionalQuestionsForXml' => 'AdditionalQuestions',
  764. -                                       'ReadableExhibitorTypeID'   => 'type',
  765. -                                       'bizName'                   => 'company',
  766. -                                       'bizAddress1'               => 'address1',
  767. -                                       'bizAddress2'               => 'address2',
  768. -                                       'bizAddress3'               => 'address3',
  769. -                                       'readableCity'                  => 'city',
  770. -                                       'readableState'                 => 'state',
  771. -                                       'bizPostalCode'             => 'postal_code',
  772. -                                       'bizUrl'                    => 'url',
  773. -                                       'bizFax'                    => 'fax',
  774. -                                       'bizPhone'                  => 'phone',
  775. -                                       'readableCountry'               => 'country',
  776. -                                       'readableIndustry'              => 'industry',
  777. -                                        'objectCreated'             => 'created',
  778. -                                        'objectModified'            => 'modified',
  779. -                                   );
  780. -
  781. -    private $_profileFieldOrder = array('uuid', 'prefix', 'firstName', 'middleName', 'lastName', 'suffix',
  782. -                                       'badgeFirstName', 'badgeLastName', 'email', 'emailVerified',
  783. -                                        'secondEmail', 'mobilePhone', 'phone', 'extension', 'fax',
  784. -                                        'ccName', 'ccEmail', 'ccPhone', 'twitterHandle', 'sex', 'membershipNumber',
  785. -                                        'title', 'company', 'division', 'industry', 'address1',
  786. -                                        'address2', 'address3', 'address4', 'city', 'state',
  787. -                                        'postalCode', 'country', 'hasOptedOut', 'preferredLanguage',
  788. -                                        'utcTimezone', 'bio', 'thumbnailUrl', 'taxExemptionNumber', 'taxExemptionNumber2',
  789. -                                        'taxExemptionNumber3', 'emergencyContact', 'emergencyPhone', 'emergencyEmail', 'emergencyRelationship',
  790. -                                        'ProfileAdditionalQuestions');
  791. -    
  792. -    private $_profileColumnAliases = array( 'readablePrefixID'     =>    'prefix',
  793. -                                            'readableSuffixID'     =>    'suffix',
  794. -                                            'bizPhone'            =>    'phone',
  795. -                                            'bizTitle'            =>    'title',
  796. -                                            'bizName'             =>    'company',
  797. -                                            'bizDivision'          =>    'division',
  798. -                                            'readableBizIndustryID'=>    'industry',
  799. -                                            'bizAddress1'         =>    'address1',
  800. -                                            'bizAddress2'          =>    'address2',
  801. -                                            'bizAddress3'          =>    'address3',
  802. -                                            'bizAddress4'          =>    'address4',
  803. -                                            'bizCity'             =>    'city',
  804. -                                            'readableBizStateID'   =>    'state',
  805. -                                            'readableBizCountryID' =>    'country',
  806. -                                            'bizPostalCode'        =>    'postalCode',
  807. -                                            'AdditionalQuestionsForXml'=>'ProfileAdditionalQuestions'
  808. -                                          );
  809. -   /**
  810. -     * @return the $_shouldCache
  811. -     */
  812. -    public function getShouldCache ()
  813. -    {
  814. -        return $this->_shouldCache;
  815. -    }
  816. -
  817. -   /**
  818. -    * // set this to false if you're trying to debug
  819. -     * @param field_type $_shouldCache
  820. -     */
  821. -    public function setShouldCache ($_shouldCache)
  822. -    {
  823. -        $this->_shouldCache = $_shouldCache;
  824. -    }
  825. -
  826. -}
  827. \ No newline at end of file
  828. diff --git a/classes/IP/Mapper/Service/RegistrationsXmlFeed.php b/classes/IP/Mapper/Service/RegistrationsXmlFeed.php
  829. index d90b5fe..d33b794 100644
  830. --- a/classes/IP/Mapper/Service/RegistrationsXmlFeed.php
  831. +++ b/classes/IP/Mapper/Service/RegistrationsXmlFeed.php
  832. @@ -18,6 +18,7 @@ class IP_Mapper_Service_RegistrationsXmlFeed extends IP_Mapper_Service_Abstract
  833.          }
  834.          
  835.          $this->_regTable = $this->getEvent()->getTableObject('Registrations');
  836. +        
  837.          foreach ($options as $option=>$value)
  838.          {
  839.              switch ($option) {
  840. diff --git a/classes/IP/Mapper/Service/SessionsXmlFeed.php b/classes/IP/Mapper/Service/SessionsXmlFeed.php
  841. deleted file mode 100644
  842. index d830b5b..0000000
  843. --- a/classes/IP/Mapper/Service/SessionsXmlFeed.php
  844. +++ /dev/null
  845. @@ -1,234 +0,0 @@
  846. -<?php
  847. -
  848. -class IP_Mapper_Service_SessionsXmlFeed extends IP_Mapper_Service_Abstract
  849. -{
  850. -    private $_cache;
  851. -    private $_cacheKey;
  852. -    private $_shouldCache = false;
  853. -    
  854. -    public function __construct($options = array(), $event = null)
  855. -    {
  856. -        if ($event) {
  857. -            $this->setEvent($event);
  858. -        }
  859. -        
  860. -        $this->_regTable = $this->getEvent()->getTableObject('Sessions');
  861. -        $this->_cache = $this->getEvent()->getCache();
  862. -        
  863. -        $this->_cacheKey = 'session_xml';
  864. -    }
  865. -    
  866. -
  867. -    
  868. -    public function execute()
  869. -    {
  870. -        if ($this->_shouldCache && ($xml = $this->getCachedXml())) {
  871. -            return $xml;
  872. -        }
  873. -        
  874. -        /**
  875. -         * this is where we're going to use the xml saved in the database to generate the feed
  876. -         */
  877. -        
  878. -        $this->_initializeMappables();
  879. -        $event = $this->getEvent();
  880. -        $regTable = $event->getTableObject('Sessions');
  881. -        $xmlTable = $event->getTableObject('XmlNodes');
  882. -        
  883. -        
  884. -        $selector = $xmlTable->select()->from(array('xml'=>XmlNodes::TABLE), array('*'), $event->getDatabase())
  885. -                                       ->joinInner(array('s'=>Sessions::TABLE),
  886. -                                             '(s.recordID = xml.objectID) AND (objectType = "Sessions")',
  887. -                                             array(),
  888. -                                             $event->getDatabase())
  889. -                                       ->where('s.publish=?', 1);      
  890. -        $selector->order('objectID');
  891. -       $xmlDocument = new DOMDocument('1.0', 'iso-8859-1');
  892. -        $xmlDocument->formatOutput = TRUE;
  893. -        $sessionsElement = $xmlDocument->createElement('session_response');
  894. -        
  895. -        foreach ($xmlTable->fetchAll($selector) as $node)
  896. -        {
  897. -            $domNode = $node->asDomNode();
  898. -            $newDomNode = $xmlDocument->importNode($domNode, true);
  899. -            $sessionsElement->appendChild($newDomNode);
  900. -         }
  901. -        
  902. -        
  903. -        $xmlDocument->appendChild($sessionsElement);
  904. -        
  905. -        $xml = $xmlDocument->saveXml();
  906. -        $this->setCachedXml($xml);
  907. -        return $xml;
  908. -    }
  909. -    
  910. -    public function getCachedXml()
  911. -    {
  912. -        if ($xmlArray = $this->_cache->load($this->_cacheKey)) {
  913. -            if ($xmlArray['expires'] > time()) {
  914. -                return $xmlArray['xml'];
  915. -            }
  916. -        }
  917. -        
  918. -        return false;
  919. -    }
  920. -    
  921. -    public function mapInstance($instance)
  922. -    {
  923. -        $this->_initializeMappables();
  924. -        
  925. -        $table = $instance->getTable();
  926. -        if (!$table instanceOf IP_Mappable_Interface) {
  927. -            throw new Exception('Instance of '.get_class($instance).' cannot be mapped because its table is not mappable');
  928. -        }
  929. -        
  930. -        $mappableAdapter = IP_Mappable_Adapter_Factory::get($table);
  931. -        $mappableAdapter->setMappable($instance->getTable());
  932. -        $mappableAdapter->setFieldOrderAppend();
  933. -        IP_Log::error("map");
  934. -       $xmlMapper = new IP_Mapper_Xml($mappableAdapter);
  935. -       return $xmlMapper->mapInstance($instance);
  936. -        
  937. -    }
  938. -    
  939. -    
  940. -    public function setCachedXml($xml)
  941. -    {
  942. -        $xmlArray = array('xml'=>$xml, 'expires'=>strtotime('+15 minutes'));
  943. -        
  944. -        $this->_cache->save($xmlArray, $this->_cacheKey);
  945. -    }
  946. -    
  947. -    
  948. -    private function _initializeMappables()
  949. -    {
  950. -        $event = $this->getEvent();
  951. -        
  952. -        $sessionsTable = $event->getTableObject('Sessions');
  953. -        $sessionsTableInfo = $sessionsTable->info();
  954. -        foreach ($sessionsTableInfo['dependentTables'] as $dep)
  955. -        {
  956. -            if (!in_array($dep, $this->_sessionFieldOrder)) {
  957. -                $this->_sessionExcludedFields[] = $dep;
  958. -            }
  959. -        }
  960. -        
  961. -        foreach ($sessionsTableInfo['referenceMap'] as $referenceKey=>$mapping)
  962. -        {
  963. -            if (!in_array($referenceKey, $this->_sessionFieldOrder)
  964. -                && $referenceKey != 'Profile') {
  965. -                $this->_sessionExcludedFields[] = $referenceKey;
  966. -            }
  967. -        }
  968. -
  969. -        $sessionsTable->setExcludedFields($this->_sessionExcludedFields);
  970. -        $sessionsTable->setExcludeUnorderedFields(true);
  971. -        $sessionsTable->setColumnAliases($this->_sessionColumnAliases);
  972. -        $sessionsTable->setFieldOrder($this->_sessionFieldOrder);
  973. -        
  974. -        $profilesTable = $event->getTableObject('Profiles');
  975. -        $profileTableInfo = $profilesTable->info();
  976. -        
  977. -        foreach ($profileTableInfo['dependentTables'] as $dep)
  978. -        {
  979. -            $this->_profileExcludedFields[] = $dep;
  980. -        }
  981. -        
  982. -        foreach ($profileTableInfo['referenceMap'] as $referenceKey=>$mapping)
  983. -        {
  984. -            $this->_profileExcludedFields[] = $referenceKey;
  985. -        }
  986. -
  987. -        $profilesTable->setFieldOrder($this->_profileFieldOrder);
  988. -        $profilesTable->setExcludedFields($this->_profileExcludedFields);
  989. -        $profilesTable->setExcludeUnorderedFields(true);
  990. -
  991. -        $profilesTable->setColumnAliases($this->_profileColumnAliases);
  992. -    }
  993. -
  994. -    private $_sessionFieldOrder = array('session_id', 'is_scheduled', 'title', 'number', 'programID', 'Program',
  995. -                                        'trackID', 'track', 'trackID2', 'track2', 'trackID3', 'track3', 'topicID',
  996. -                                        'topic', 'typeID', 'type', 'date', 'roomID', 'room', 'startTime', 'endTime',
  997. -                                        'capacity', 'Owner', 'Mentor', 'headcount1', 'headcount2', 'abstract',
  998. -                                        'AdditionalQuestions' , 'Speakers', 'files', 'EvaluationQuestions');
  999. -    
  1000. -    private $_sessionExcludedFields = array('status', 'abstractOverallStatus', 'fileOverallStatus', 'publish',
  1001. -                                            'mentorUserID', 'ownerUserID', 'notes', 'abstractStatus', 'avRequirements',
  1002. -                                             'creationDate', 'modifiedDate', 'exhibitorID');
  1003. -    
  1004. -    private $_sessionColumnAliases =     array('recordID'                  => 'session_id',
  1005. -                                              'readableTitle'              =>'title',
  1006. -                                               'readableNumber'            =>'number',
  1007. -                                               'readableProgramID'         =>'Program',
  1008. -                                               'readableTrack'             =>'track',
  1009. -                                               'readableTopic'             =>'topic',
  1010. -                                               'readableType'              =>'type',
  1011. -                                               'mentor'                    => 'Mentor',
  1012. -                                               'owner'                     => 'Owner',
  1013. -                                               'AdditionalQuestionsForXml' =>    'AdditionalQuestions',
  1014. -                                               'sessionPersonnelForXml'    => 'Speakers',
  1015. -                                               'scheduledForXml'           => 'is_scheduled',
  1016. -                                               'readableTrackID'           => 'track',
  1017. -                                               'readableTrackID2'          =>'track2',
  1018. -                                               'readableTrackID3'          =>'track3',
  1019. -                                               'readableTopicID'           =>'topic',
  1020. -                                               'readableTypeID'            =>'type',
  1021. -                                               'sessionDate'               => 'date' ,
  1022. -                                               'readableRoomID'            => 'room',
  1023. -                                               'readableStartTime'         => 'startTime',  
  1024. -                                               'readableEndTime'           => 'endTime',
  1025. -                                               'maxAttendance'             => 'capacity',
  1026. -                                               'AbstractForXml'            => 'abstract',
  1027. -                                               'localProfile'              =>    'Profile',
  1028. -                                               'filesForXml'               => 'files',
  1029. -                                                'EvaluationQuestionsForXml' => 'EvaluationQuestions',
  1030. -                                                'objectCreated'             => 'created',
  1031. -                                                'objectModified'            => 'modified'
  1032. -                                 );
  1033. -
  1034. -    private $_profileFieldOrder = array('uuid', 'prefix', 'firstName', 'middleName', 'lastName', 'suffix',
  1035. -                                       'badgeFirstName', 'badgeLastName', 'email', 'emailVerified',
  1036. -                                        'secondEmail', 'mobilePhone', 'phone', 'extension', 'fax',
  1037. -                                        'ccName', 'ccEmail', 'ccPhone', 'twitterHandle', 'sex', 'membershipNumber',
  1038. -                                        'title', 'company', 'division', 'industry', 'address1',
  1039. -                                        'address2', 'address3', 'address4', 'city', 'state',
  1040. -                                        'postalCode', 'country', 'hasOptedOut', 'preferredLanguage',
  1041. -                                        'utcTimezone', 'bio', 'thumbnailUrl', 'taxExemptionNumber', 'taxExemptionNumber2',
  1042. -                                        'taxExemptionNumber3', 'emergencyContact', 'emergencyPhone', 'emergencyEmail', 'emergencyRelationship',
  1043. -                                        'ProfileAdditionalQuestions');
  1044. -    
  1045. -    private $_profileColumnAliases = array( 'readablePrefixID'     =>    'prefix',
  1046. -                                            'readableSuffixID'     =>    'suffix',
  1047. -                                            'bizPhone'            =>    'phone',
  1048. -                                            'bizTitle'            =>    'title',
  1049. -                                            'bizName'             =>    'company',
  1050. -                                            'bizDivision'          =>    'division',
  1051. -                                            'readableBizIndustryID'=>    'industry',
  1052. -                                            'bizAddress1'         =>    'address1',
  1053. -                                            'bizAddress2'          =>    'address2',
  1054. -                                            'bizAddress3'          =>    'address3',
  1055. -                                            'bizAddress4'          =>    'address4',
  1056. -                                            'bizCity'             =>    'city',
  1057. -                                            'readableBizStateID'   =>    'state',
  1058. -                                            'readableBizCountryID' =>    'country',
  1059. -                                            'bizPostalCode'        =>    'postalCode',
  1060. -                                            'AdditionalQuestionsForXml'=>'ProfileAdditionalQuestions'
  1061. -                                          );
  1062. -   /**
  1063. -     * @return the $_shouldCache
  1064. -     */
  1065. -    public function getShouldCache ()
  1066. -    {
  1067. -        return $this->_shouldCache;
  1068. -    }
  1069. -
  1070. -   /**
  1071. -    * // set this to false if you're trying to debug
  1072. -     * @param field_type $_shouldCache
  1073. -     */
  1074. -    public function setShouldCache ($_shouldCache)
  1075. -    {
  1076. -        $this->_shouldCache = $_shouldCache;
  1077. -    }
  1078. -
  1079. -}
  1080. \ No newline at end of file
  1081. diff --git a/classes/IP/Mapper/Service/SpeakersXmlFeed.php b/classes/IP/Mapper/Service/SpeakersXmlFeed.php
  1082. deleted file mode 100644
  1083. index d2be5da..0000000
  1084. --- a/classes/IP/Mapper/Service/SpeakersXmlFeed.php
  1085. +++ /dev/null
  1086. @@ -1,268 +0,0 @@
  1087. -<?php
  1088. -
  1089. -class IP_Mapper_Service_SpeakersXmlFeed extends IP_Mapper_Service_Abstract
  1090. -{
  1091. -    private $_cache;
  1092. -    private $_cacheKey;
  1093. -    private $_shouldCache = false;
  1094. -
  1095. -    public function __construct($options = array(), $event = null)
  1096. -    {
  1097. -        if ($event) {
  1098. -            $this->setEvent($event);
  1099. -        }
  1100. -        
  1101. -        $this->_regTable = $this->getEvent()->getTableObject('SessionPersonnel');
  1102. -        $this->_cache = $this->getEvent()->getCache();
  1103. -        
  1104. -        $this->_cacheKey = 'speaker_xml';
  1105. -    }
  1106. -
  1107. -    public function execute()
  1108. -    {
  1109. -        if ($this->_shouldCache && ($xml = $this->getCachedXml())) {
  1110. -            return $xml;
  1111. -        }
  1112. -        
  1113. -        /**
  1114. -         * this is where we're going to use the xml saved in the database to generate the feed
  1115. -         */
  1116. -        
  1117. -        $this->_initializeMappables();
  1118. -        $event = $this->getEvent();
  1119. -        $regTable = $event->getTableObject('SessionPersonnel');
  1120. -        $xmlTable = $event->getTableObject('XmlNodes');
  1121. -        
  1122. -        
  1123. -        $selector = $xmlTable->select()->from(array('xml'=>XmlNodes::TABLE), array('*'), $event->getDatabase())
  1124. -                                       ->joinInner(array('sp'=>SessionPersonnel::TABLE),
  1125. -                                             '(sp.recordID = xml.objectID) AND (objectType = "SessionPersonnel")',
  1126. -                                             array(),
  1127. -                                             $event->getDatabase());
  1128. -        $selector->order('objectID');
  1129. -       $xmlDocument = new DOMDocument('1.0', 'iso-8859-1');
  1130. -        $xmlDocument->formatOutput = TRUE;
  1131. -        $sessionsElement = $xmlDocument->createElement('speaker_response');
  1132. -        
  1133. -        foreach ($xmlTable->fetchAll($selector) as $node)
  1134. -        {
  1135. -            $domNode = $node->asDomNode();
  1136. -            $newDomNode = $xmlDocument->importNode($domNode, true);
  1137. -            $sessionsElement->appendChild($newDomNode);
  1138. -         }
  1139. -        
  1140. -        
  1141. -        $xmlDocument->appendChild($sessionsElement);
  1142. -        
  1143. -        $xml = $xmlDocument->saveXml();
  1144. -        $this->setCachedXml($xml);
  1145. -        return $xml;
  1146. -    }
  1147. -    
  1148. -    public function getCachedXml()
  1149. -    {
  1150. -        if ($xmlArray = $this->_cache->load($this->_cacheKey)) {
  1151. -            if ($xmlArray['expires'] > time()) {
  1152. -                return $xmlArray['xml'];
  1153. -            }
  1154. -        }
  1155. -        
  1156. -        return false;
  1157. -    }
  1158. -    
  1159. -    public function mapInstance($instance)
  1160. -    {
  1161. -        $this->_initializeMappables();
  1162. -        
  1163. -        $table = $instance->getTable();
  1164. -        if (!$table instanceOf IP_Mappable_Interface) {
  1165. -            throw new Exception('Instance of '.get_class($instance).' cannot be mapped because its table is not mappable');
  1166. -        }
  1167. -        
  1168. -        $mappableAdapter = IP_Mappable_Adapter_Factory::get($table);
  1169. -        $mappableAdapter->setMappable($instance->getTable());
  1170. -        $mappableAdapter->setFieldOrderAppend();
  1171. -        IP_Log::error("map");
  1172. -       $xmlMapper = new IP_Mapper_Xml($mappableAdapter);
  1173. -       return $xmlMapper->mapInstance($instance);
  1174. -        
  1175. -    }
  1176. -    
  1177. -    
  1178. -    public function setCachedXml($xml)
  1179. -    {
  1180. -        $xmlArray = array('xml'=>$xml, 'expires'=>strtotime('+15 minutes'));
  1181. -        
  1182. -        $this->_cache->save($xmlArray, $this->_cacheKey);
  1183. -    }
  1184. -    
  1185. -    
  1186. -    private function _initializeMappables()
  1187. -    {
  1188. -        $event = $this->getEvent();
  1189. -        
  1190. -        $spTable = $event->getTableObject('SessionPersonnel');
  1191. -        $spTableInfo = $spTable->info();
  1192. -        foreach ($spTableInfo['dependentTables'] as $dep)
  1193. -        {
  1194. -            if (!in_array($dep, $this->_spFieldOrder)) {
  1195. -                $this->_spExcludedFields[] = $dep;
  1196. -            }
  1197. -        }
  1198. -        
  1199. -        foreach ($spTableInfo['referenceMap'] as $referenceKey=>$mapping)
  1200. -        {
  1201. -            if (!in_array($referenceKey, $this->_spFieldOrder)
  1202. -                && $referenceKey != 'Profile') {
  1203. -                $this->_spExcludedFields[] = $referenceKey;
  1204. -            }
  1205. -        }
  1206. -
  1207. -        $spTable->setExcludedFields($this->_spExcludedFields);
  1208. -        $spTable->setExcludeUnorderedFields(true);
  1209. -        $spTable->setColumnAliases($this->_spColumnAliases);
  1210. -        $spTable->setFieldOrder($this->_spFieldOrder);
  1211. -        
  1212. -        $profilesTable = $event->getTableObject('Profiles');
  1213. -        $profileTableInfo = $profilesTable->info();
  1214. -        
  1215. -        foreach ($profileTableInfo['dependentTables'] as $dep)
  1216. -        {
  1217. -            $this->_profileExcludedFields[] = $dep;
  1218. -        }
  1219. -        
  1220. -        foreach ($profileTableInfo['referenceMap'] as $referenceKey=>$mapping)
  1221. -        {
  1222. -            $this->_profileExcludedFields[] = $referenceKey;
  1223. -        }
  1224. -
  1225. -        $profilesTable->setFieldOrder($this->_profileFieldOrder);
  1226. -        $profilesTable->setExcludedFields($this->_profileExcludedFields);
  1227. -        $profilesTable->setExcludeUnorderedFields(true);
  1228. -
  1229. -        $profilesTable->setColumnAliases($this->_profileColumnAliases);
  1230. -        
  1231. -
  1232. -        $sessionsTable = $event->getTableObject('Sessions');
  1233. -        $sessionsInfo = $sessionsTable->info();
  1234. -        
  1235. -        foreach ($sessionsInfo['dependentTables'] as $dep)
  1236. -        {
  1237. -           if (!in_array($dep, $this->_sessionFieldOrder)) {
  1238. -               $this->_sessionExcludedFields[] = $dep;
  1239. -           }
  1240. -        }
  1241. -        
  1242. -        foreach ($sessionsInfo['referenceMap'] as $referenceKey=>$mapping)
  1243. -        {
  1244. -           if (!in_array($referenceKey, $this->_sessionFieldOrder)
  1245. -                && $referenceKey != 'Profile') {
  1246. -               $this->_sessionExcludedFields[] = $referenceKey;
  1247. -           }
  1248. -        }
  1249. -
  1250. -        $sessionsTable->setFieldOrder($this->_sessionFieldOrder);
  1251. -        $sessionsTable->setExcludedFields($this->_sessionExcludedFields);
  1252. -        $sessionsTable->setExcludeUnorderedFields(true);
  1253. -
  1254. -        $sessionsTable->setColumnAliases($this->_sessionColumnAliases);
  1255. -        
  1256. -
  1257. -    }
  1258. -
  1259. -    private $_spFieldOrder = array('Profile', 'AdditionalQuestions', 'role', 'evaluation_responses', 'evaluation_average',
  1260. -                                    'evaluation_notes', 'Sessions');
  1261. -    private $_spExcludedFields = array('recordID', 'sessionID', 'profileID', 'roleID', 'publicChangesLocked', 'acceptedTerms',
  1262. -                                        'creationDate');
  1263. -    
  1264. -    private $_spColumnAliases =     array(  
  1265. -                                   'readableRoleID'     => 'role',
  1266. -                                   'numberOfResponses'  => 'evaluation_responses',
  1267. -                                   'averageResponse'    => 'evaluation_average',
  1268. -                                   'notes'              => 'evaluation_notes',
  1269. -                                   'AdditionalQuestionsForXml'=>'AdditionalQuestions'          
  1270. -                                 );
  1271. -
  1272. -    private $_profileFieldOrder = array('uuid', 'prefix', 'firstName', 'middleName', 'lastName', 'suffix',
  1273. -                                       'badgeFirstName', 'badgeLastName', 'email', 'emailVerified',
  1274. -                                        'secondEmail', 'mobilePhone', 'phone', 'extension', 'fax',
  1275. -                                        'ccName', 'ccEmail', 'ccPhone', 'twitterHandle', 'sex', 'membershipNumber',
  1276. -                                        'title', 'company', 'division', 'industry', 'address1',
  1277. -                                        'address2', 'address3', 'address4', 'city', 'state',
  1278. -                                        'postalCode', 'country', 'hasOptedOut', 'preferredLanguage',
  1279. -                                        'utcTimezone', 'bio', 'thumbnailUrl', 'taxExemptionNumber', 'taxExemptionNumber2',
  1280. -                                        'taxExemptionNumber3', 'emergencyContact', 'emergencyPhone', 'emergencyEmail', 'emergencyRelationship',
  1281. -                                        'ProfileAdditionalQuestions');
  1282. -    
  1283. -    private $_profileColumnAliases = array( 'readablePrefixID'     =>    'prefix',
  1284. -                                            'readableSuffixID'     =>    'suffix',
  1285. -                                            'bizPhone'            =>    'phone',
  1286. -                                            'bizTitle'            =>    'title',
  1287. -                                            'bizName'             =>    'company',
  1288. -                                            'bizDivision'          =>    'division',
  1289. -                                            'readableBizIndustryID'=>    'industry',
  1290. -                                            'bizAddress1'         =>    'address1',
  1291. -                                            'bizAddress2'          =>    'address2',
  1292. -                                            'bizAddress3'          =>    'address3',
  1293. -                                            'bizAddress4'          =>    'address4',
  1294. -                                            'bizCity'             =>    'city',
  1295. -                                            'readableBizStateID'   =>    'state',
  1296. -                                            'readableBizCountryID' =>    'country',
  1297. -                                            'bizPostalCode'        =>    'postalCode',
  1298. -                                            'AdditionalQuestionsForXml'=>'ProfileAdditionalQuestions'
  1299. -                                          );
  1300. -                                          
  1301. -   private $_sessionFieldOrder = array('session_id', 'is_scheduled', 'title', 'programID', 'Program', 'trackID', 'track',
  1302. -                                        'trackID2', 'track2', 'trackID3', 'track3', 'topicID', 'topic', 'typeID', 'type',
  1303. -                                        'date', 'roomID', 'room', 'startTime', 'endTime', 'capacity', 'abstract', 'Owner',
  1304. -                                        'Mentor', 'headcount1', 'headcount2', 'abstract',  'AdditionalQuestions', 'files', 'EvaluationQuestions');
  1305. -    
  1306. -    private $_sessionExcludedFields = array('status', 'abstractOverallStatus', 'fileOverallStatus', 'publish', 'mentorUserID',
  1307. -                                            'ownerUserID', 'notes', 'abstractStatus', 'avRequirements', 'creationDate', 'exhibitorID');
  1308. -    
  1309. -    private $_sessionColumnAliases =     array('recordID'                  => 'session_id',
  1310. -                                              'readableTitle'              =>'title',
  1311. -                                               'readableNumber'            =>'number',
  1312. -                                               'readableProgramID'         =>'Program',
  1313. -                                               'readableTrack'             =>'track',
  1314. -                                               'readableTopic'             =>'topic',
  1315. -                                               'readableType'              =>'type',
  1316. -                                               'mentor'                    => 'Mentor',
  1317. -                                               'owner'                     => 'Owner',
  1318. -                                               'AdditionalQuestionsForXml' =>    'AdditionalQuestions',
  1319. -                                               'sessionPersonnelForXml'    => 'SessionPersonnel',
  1320. -                                               'scheduledForXml'           => 'is_scheduled',
  1321. -                                               'readableTrackID'           => 'track',
  1322. -                                               'readableTrackID2'          =>'track2',
  1323. -                                               'readableTrackID3'          =>'track3',
  1324. -                                               'readableTopicID'           =>'topic',
  1325. -                                               'readableTypeID'            =>'type',
  1326. -                                               'sessionDate'               => 'date' ,
  1327. -                                               'readableRoomID'            => 'room',
  1328. -                                               'readableStartTime'         => 'startTime',  
  1329. -                                               'readableEndTime'           => 'endTime',
  1330. -                                               'maxAttendance'             => 'capacity',
  1331. -                                               'AbstractForXml'            => 'abstract',
  1332. -                                               'localProfile'              =>    'Profile',
  1333. -                                               'filesForXml'               => 'files',
  1334. -                                               'EvaluationQuestionsForXml' => 'EvaluationQuestions'                              
  1335. -                                 );
  1336. -                                          
  1337. -   /**
  1338. -     * @return the $_shouldCache
  1339. -     */
  1340. -    public function getShouldCache ()
  1341. -    {
  1342. -        return $this->_shouldCache;
  1343. -    }
  1344. -
  1345. -   /**
  1346. -    * // set this to false if you're trying to debug
  1347. -     * @param field_type $_shouldCache
  1348. -     */
  1349. -    public function setShouldCache ($_shouldCache)
  1350. -    {
  1351. -        $this->_shouldCache = $_shouldCache;
  1352. -    }
  1353. -
  1354. -}
  1355. \ No newline at end of file
  1356. diff --git a/classes/IP/Mapper/Xml.php b/classes/IP/Mapper/Xml.php
  1357. index 6f46e90..ecde010 100644
  1358. --- a/classes/IP/Mapper/Xml.php
  1359. +++ b/classes/IP/Mapper/Xml.php
  1360. @@ -70,6 +70,7 @@ class IP_Mapper_Xml extends IP_Mapper_Abstract
  1361.          }
  1362.          // Adding the child nodes here.
  1363.          $values = $this->_getValuesFromMap($instance);
  1364. +        
  1365.          foreach ($values as $mapKey=>$mapValue)
  1366.          {
  1367.              if(is_array($mapValue)) {
  1368. @@ -100,9 +101,6 @@ class IP_Mapper_Xml extends IP_Mapper_Abstract
  1369.                  } else {
  1370.                      $this->addArrayNode($value, $xml);
  1371.                  }
  1372. -            } else if(is_object($value)) {
  1373. -                $arrayVal[$key] = $this->_mapObject($key, $value);
  1374. -                $this->addArrayNode($arrayVal, $xml);
  1375.              } else {
  1376.                  $title = $name ? $name : $key;
  1377.                  $this->_addChildElement($xml, $title, $value);
  1378. @@ -140,17 +138,16 @@ class IP_Mapper_Xml extends IP_Mapper_Abstract
  1379.          return $returnArray;
  1380.      }
  1381.      
  1382. -    protected function _mapMethod($fieldName, $object, $method, $value = '')
  1383. +    protected function _mapMethod($fieldName, $object, $method)
  1384.      {
  1385.          try {
  1386.              $result = $object->{$method}();
  1387.              if ($result === null) {
  1388. -                return ''; // If null is returned then the final value is assumed blank.
  1389. +                return $method;
  1390.              }
  1391.          } catch (Exception $e) {
  1392. -            IP_Log::notice('XML Mapper exception in _mapMethod. Attempted method "' . $method . '" of "' . get_class($object) . '". Reverted to the value of ' . $value . ' for XML.');
  1393. -            IP_Log::error($e);
  1394. -            return $value; // "band-aid" fix to not leave empty data when value is final but matches a method that exists (i.e.: last name of "date" or "row")
  1395. +            // ex: getDate() for a guy with the last name "date", band-aid for now
  1396. +            return '';
  1397.          }
  1398.          
  1399.          return $this->_getValueFromMap($fieldName, $result, $object);
  1400. diff --git a/db/Event/499-AddPointColumn.php b/db/Event/499-AddPointColumn.php
  1401. new file mode 100644
  1402. index 0000000..eaa4272
  1403. --- /dev/null
  1404. +++ b/db/Event/499-AddPointColumn.php
  1405. @@ -0,0 +1,24 @@
  1406. +<?php
  1407. +/**
  1408. + * Add points column
  1409. + * @author kshema
  1410. + */
  1411. +class Event_499 extends Migration
  1412. +{
  1413. +    public function deploy()
  1414. +    {
  1415. +        if (!MyDB::getInstance()->columnExists($this->migrationObject->database, Sessions::TABLE, 'points')) {
  1416. +            $sql = "ALTER TABLE {$this->getTableName(Sessions::TABLE)} ADD COLUMN `points` smallint(1)";
  1417. +            $result = MyDB::getInstance()->execute($sql);
  1418. +            if (!$result) {
  1419. +                 return false;
  1420. +            }    
  1421. +        }
  1422. +        return true;
  1423. +    }
  1424. +
  1425. +    public function getRollbackSQL()
  1426. +    {
  1427. +        return "ALTER TABLE {$this->getTableName(Sessions::TABLE)} DROP COLUMN `points`";
  1428. +    }
  1429. +}
  1430. diff --git a/model/Exhibitor.php b/model/Exhibitor.php
  1431. index bd0df45..ca51669 100644
  1432. --- a/model/Exhibitor.php
  1433. +++ b/model/Exhibitor.php
  1434. @@ -3,7 +3,7 @@
  1435.   *
  1436.   * @package Models
  1437.   */
  1438. -class Exhibitor extends IP_Db_Table_Row_EventAbstract implements XmlTransformable {
  1439. +class Exhibitor extends IP_Db_Table_Row_EventAbstract {
  1440.  
  1441.     protected $_isGolf = false;
  1442.  
  1443. @@ -946,7 +946,6 @@ class Exhibitor extends IP_Db_Table_Row_EventAbstract implements XmlTransformabl
  1444.     public function save($bypass = false)
  1445.     {
  1446.         if($bypass) {
  1447. -           $this->generateXml();
  1448.             //this is a GolfSponsor being saved - bypass the rest of this method
  1449.             return parent::save();
  1450.         }
  1451. @@ -1043,7 +1042,7 @@ class Exhibitor extends IP_Db_Table_Row_EventAbstract implements XmlTransformabl
  1452.         if($this->confirmation == null || $this->confirmation == '') {
  1453.             $this->_generateConfirmation();
  1454.         }
  1455. -       $this->generateXml();
  1456. +      
  1457.         return parent::save();
  1458.     }
  1459.  
  1460. @@ -2166,113 +2165,6 @@ class Exhibitor extends IP_Db_Table_Row_EventAbstract implements XmlTransformabl
  1461.     public function getReadableCountry() {
  1462.         return $this->Country->full;
  1463.     }
  1464. -   public function generateXml()
  1465. -   {
  1466. -       if($this->_isGolf()) {
  1467. -           $tableName = 'GolfSponsors';
  1468. -           $rowName = 'GolfSponsor';
  1469. -       } else {
  1470. -           $tableName = 'Exhibitors';
  1471. -           $rowName = 'Exhibitor';
  1472. -       }
  1473. -       // don't generate on public side
  1474. -       if (IP::getInstance()->isPublic()) {
  1475. -           $this->getTableObject('CronObjectUpdates')->registerUpdate($tableName, $this->recordID);
  1476. -           return;
  1477. -       }
  1478. -      
  1479. -       $time = microtime();
  1480. -       $service = new IP_Mapper_Service_ExhibitorsXmlFeed(array('isGolf'=>$this->_isGolf()), $this->getEvent());
  1481. -       $xml = $service->mapInstance($this);
  1482. -       $xmlTable = $this->getEvent()->getTableObject('XmlNodes');
  1483. -       $select = $xmlTable->select()->where("objectType = '$tableName'")
  1484. -                                    ->where('objectID = ?', $this->recordID)
  1485. -                                    ->where("parentNodeName = '$tableName'")
  1486. -                                    ->where("nodeName = '$rowName'");
  1487. -      
  1488. -      
  1489. -       if (!($sessionNode = $xmlTable->fetchRow($select))) {
  1490. -           $sessionNode = $xmlTable->createRow();
  1491. -           // @todo implement parent reference in a way that doesn't break when generating xml on update
  1492. -           $sessionNode->objectType = "$tableName";
  1493. -           $sessionNode->objectID = $this->recordID;
  1494. -       }
  1495. -      
  1496. -       $sessionNode->nodeName = "$rowName";
  1497. -       $sessionNode->parentNodeName = "$tableName";
  1498. -       $sessionNode->xmlString = $xml;
  1499. -       $sessionNode->save();
  1500. -   }
  1501. -  
  1502. -   public function getExhibitorPersonnelForXml() {
  1503. -       $persons = array();
  1504. -       foreach ($this->ExhibitorPersonnel as $person) {
  1505. -           $persons[] = array(
  1506. -                           'additional_personnel' => array(
  1507. -                               'Role' =>  $person->readableExhibitorRoleID,
  1508. -                               'Profile' => $person->Profile));
  1509. -       }
  1510. -       return $persons;
  1511. -   }
  1512. -  
  1513. -   public function getExhibitorBoothsForXml() {
  1514. -       $booths = array();
  1515. -       foreach ($this->ExhibitorBooths as $booth) {
  1516. -           $booths[] = array(
  1517. -                           'booth' => array(
  1518. -                               'name'          =>  $booth->name,
  1519. -                               'booth_type'    =>  $booth->BoothType->description,
  1520. -                               'status'        => 'Reserved',
  1521. -                               'exhibitor_name'=>  $this->bizName,
  1522. -                               'exhibitor_id'  =>  $this->recordID
  1523. -                           ));
  1524. -       }
  1525. -       return $booths;
  1526. -   }
  1527. -  
  1528. -   public function getExbSpPackagesForXml() {
  1529. -       $packages = array();
  1530. -       foreach ($this->ExhibitorPackages as $package) {
  1531. -           $packages[] = array(
  1532. -                           'sponsorship_package' => array(
  1533. -                               'id'            =>  $package->sponsorshipPackageID,
  1534. -                               'name'          =>  $package->name,
  1535. -                           ));
  1536. -       }
  1537. -       return $packages;
  1538. -   }
  1539. -  
  1540. -   public function getAnsSponsorshipsForXml() {
  1541. -       $packages = array();
  1542. -       foreach ($this->ExhibitorsAncillarySponsorships as $package) {
  1543. -           $packages[] = array(
  1544. -                           'ancillary_sponsorship' => array(
  1545. -                               'id'            =>  $package->ancillarySponsorshipID,
  1546. -                               'name'          =>  $package->name,
  1547. -                           ));
  1548. -       }
  1549. -       return $packages;
  1550. -   }
  1551. -  
  1552. -   public function getAdditionalQuestionsForXml()
  1553. -   {
  1554. -       $additionalQuestions = array();
  1555. -       foreach ($this->AdditionalQuestionResponses as $response)
  1556. -       {
  1557. -            if (!array_key_exists($response->questionID, $additionalQuestions)) {
  1558. -                $additionalQuestions[$response->questionID] = array(
  1559. -                    'AdditionalQuestion' => array(
  1560. -                        'questionID'    => $response->questionID,
  1561. -                        'questionLabel' => $response->getQuestionLabel(),
  1562. -                        'responses'     => array()
  1563. -                    )
  1564. -                );
  1565. -            }
  1566. -            $responseArray = array('value' => $response->getReadableString(), 'code' => $response->Option->globalAnswerID);
  1567. -            $additionalQuestions[$response->questionID]['AdditionalQuestion']['responses'][] = array('response' => $responseArray);
  1568. -       }
  1569. -       return $additionalQuestions;
  1570. -   }
  1571.    
  1572.     public function exportColumn($column, $groupBy = null, &$sequentialID, $fileStatus) {
  1573.         include('FilesexportController.php');
  1574. diff --git a/model/Exhibitors.php b/model/Exhibitors.php
  1575. index e514cdc..9a13359 100644
  1576. --- a/model/Exhibitors.php
  1577. +++ b/model/Exhibitors.php
  1578. @@ -5,7 +5,7 @@
  1579.   * @package Models
  1580.   * @subpackage Table
  1581.   */
  1582. -class Exhibitors extends IP_Db_Table_EventAbstract implements IP_Mappable_Interface, XmlTrackable
  1583. +class Exhibitors extends IP_Db_Table_EventAbstract implements IP_Mappable_Interface
  1584.  {
  1585.      protected $_excludedProtectedTableFields = array('golfObject', 'accessCodeDate');
  1586.  
  1587. @@ -1244,52 +1244,4 @@ class Exhibitors extends IP_Db_Table_EventAbstract implements IP_Mappable_Interf
  1588.                                      self::LABEL_PROMOCODES_ANY));
  1589.        
  1590.     }
  1591. -  
  1592. -   public function selectNodesToUpdate($expirationTimeString = "-15 minutes", $limit = null, $offset = 0)
  1593. -   {
  1594. -       $dbName = $this->getEvent()->getDatabase();
  1595. -       $expiredTime = date('Y-m-d H:i:s', strtotime($expirationTimeString, time()));
  1596. -       $xmlTable = $this->getEvent()->getTableObject('XmlNodes');
  1597. -
  1598. -       $notInXmlSelect = "SELECT recordID FROM {$this->getSelectTableName()}
  1599. -                          WHERE recordID NOT IN (SELECT objectID FROM {$xmlTable->getSelectTableName()} WHERE objectType = 'Exhibitors' AND objectID IS NOT NULL)";
  1600. -      
  1601. -       $ids = array();
  1602. -       foreach (MyDb::getInstance()->fetchAll($notInXmlSelect) as $row)
  1603. -       {
  1604. -           $ids[] = $row['recordID'];
  1605. -       }
  1606. -                          
  1607. -       $expiredXmlSelect = "SELECT objectID FROM {$xmlTable->getSelectTableName()}
  1608. -                            WHERE objectType = 'Exhibitors' AND objectID IS NOT NULL
  1609. -                            AND modifiedDate <= '{$expiredTime}'";
  1610. -      
  1611. -       foreach (MyDb::getInstance()->fetchAll($expiredXmlSelect) as $row)
  1612. -       {
  1613. -           $ids[] = $row['objectID'];
  1614. -       }
  1615. -       if (!empty($ids)) {
  1616. -       $implodedIDs = implode(', ', $ids);
  1617. -      
  1618. -       $expiredSelect = $this->select()->from(array('reg'=>self::TABLE), array('*'), $dbName)
  1619. -                                       ->where("reg.recordID IN ($implodedIDs)");     
  1620. -       }   else {
  1621. -            return null;
  1622. -          
  1623. -       }                                                      
  1624. -        if ($limit) {
  1625. -            $expiredSelect->limit($limit, $offset);
  1626. -        }
  1627. -                                      
  1628. -        return $expiredSelect;
  1629. -      
  1630. -   }
  1631. -  
  1632. -   public function refreshNodes($expirationTimeString = "-15 minutes", $limit = null, $offset = 0)
  1633. -   {
  1634. -       foreach ($this->fetchAll($this->selectNodesToUpdate($expirationTimeString, $limit, $offset)) as $exhibitor)
  1635. -       {
  1636. -           $exhibitor->generateXml();
  1637. -       }
  1638. -   }
  1639.  }
  1640. diff --git a/model/Profile.php b/model/Profile.php
  1641. index 36d1483..a27bd78 100644
  1642. --- a/model/Profile.php
  1643. +++ b/model/Profile.php
  1644. @@ -1811,7 +1811,7 @@ class Profile extends IP_Db_Table_Row_EventAbstract
  1645.      public function getBuyerCategories() {
  1646.          if (count($this->Buyers) > 0) {
  1647.              $catogories = $this->Buyers->get(0)->buyerCategoryNames;
  1648. -            return implode(", ",$catogories);
  1649. +            return implode(",",$catogories);
  1650.          }
  1651.          return null;
  1652.      }
  1653. diff --git a/model/Session.php b/model/Session.php
  1654. index e2d86d4..3366ca5 100644
  1655. --- a/model/Session.php
  1656. +++ b/model/Session.php
  1657. @@ -5,7 +5,7 @@
  1658.   * @package Models
  1659.   * @subpackage Row
  1660.   */
  1661. -class Session extends IP_Db_Table_Row_EventAbstractCalendarObject implements XmlTransformable {
  1662. +class Session extends IP_Db_Table_Row_EventAbstractCalendarObject {
  1663.  
  1664.      protected $_usesCache = true;
  1665.      
  1666. @@ -1108,167 +1108,32 @@ class Session extends IP_Db_Table_Row_EventAbstractCalendarObject implements Xml
  1667.          return $summary;
  1668.      }
  1669.  
  1670. -   public function save()
  1671. -    {
  1672. -       $this->generateXml();
  1673. -        parent::save();
  1674. +    public function getReadableStartTime() {
  1675. +        $startTime = $this->getDateTimeObject('startTime');
  1676. +        if ($startTime) {
  1677. +            $startTimestamp = $startTime->getTimestamp();
  1678. +            return formatTime($startTime);
  1679. +        }
  1680.      }
  1681. -    
  1682. -   public function generateXml()
  1683. -   {
  1684. -       // don't generate on public side
  1685. -       if (IP::getInstance()->isPublic()) {
  1686. -           $this->getTableObject('CronObjectUpdates')->registerUpdate('Sessions', $this->recordID);
  1687. -           return;
  1688. -       }
  1689. -      
  1690. -       $time = microtime();
  1691. -       $service = new IP_Mapper_Service_SessionsXmlFeed(array(), $this->getEvent());
  1692. -       $xml = $service->mapInstance($this);
  1693. -       $xmlTable = $this->getEvent()->getTableObject('XmlNodes');
  1694. -       $select = $xmlTable->select()->where('objectType = "Sessions"')
  1695. -                                    ->where('objectID = ?', $this->recordID)
  1696. -                                    ->where('parentNodeName = "Sessions"')
  1697. -                                    ->where('nodeName = "Session"');
  1698. -      
  1699. -      
  1700. -       if (!($sessionNode = $xmlTable->fetchRow($select))) {
  1701. -           $sessionNode = $xmlTable->createRow();
  1702. -           // @todo implement parent reference in a way that doesn't break when generating xml on update
  1703. -           $sessionNode->objectType = "Sessions";
  1704. -           $sessionNode->objectID = $this->recordID;
  1705. -       }
  1706. -      
  1707. -       $sessionNode->nodeName = 'Session';
  1708. -       $sessionNode->parentNodeName = 'Sessions';
  1709. -       $sessionNode->xmlString = $xml;
  1710. -       $sessionNode->save();
  1711. -   }
  1712. -  
  1713. -   public function getSessionPersonnelForXml()
  1714. -   {
  1715. -       $sp = array();
  1716. -       foreach ($this->SessionPersonnel as $ra)
  1717. -       {
  1718. -           $sp[] = array('Speaker' => array(
  1719. -                           'Role'                                  => $ra->readableRoleID,
  1720. -                           'Profile'                               => $ra->Profile,
  1721. -                           'evaluation_responses'                  => $ra->numberOfResponses,
  1722. -                           'evaluation_average'                    => $ra->averageResponse,
  1723. -                           'evaluation_notes'                      => $ra->notes,
  1724. -                           'sessionPersonnel_AdditionalQuestions'  => $ra->additionalQuestionsForXml
  1725. -                       ));
  1726. -       }
  1727. -       return $sp;
  1728. -   }
  1729. -   public function getAdditionalQuestionsForXml()
  1730. -   {
  1731. -       $additionalQuestions = array();
  1732. -       foreach ($this->AdditionalQuestionResponses as $response)
  1733. -       {
  1734. -            if (!array_key_exists($response->questionID, $additionalQuestions)) {
  1735. -                $additionalQuestions[$response->questionID] = array(
  1736. -                    'AdditionalQuestion' => array(
  1737. -                        'questionID'    => $response->questionID,
  1738. -                        'questionLabel' => $response->getQuestionLabel(),
  1739. -                        'responses'     => array()
  1740. -                    )
  1741. -                );
  1742. -            }
  1743. -            $responseArray = array('value' => $response->getReadableString(), 'code' => $response->Option->globalAnswerID);
  1744. -            $additionalQuestions[$response->questionID]['AdditionalQuestion']['responses'][] = array('response' => $responseArray);
  1745. -       }
  1746. -       return $additionalQuestions;
  1747. -   }
  1748. -  
  1749. -   public function getScheduledForXml() {
  1750. -       $date = '';
  1751. -       $startTime = $this->getDateTimeObject('startTime');
  1752. -       if ($startTime) {
  1753. -           $date = formatDate($startTime);
  1754. -       }
  1755. -       if (empty($date)) {
  1756. -           return IP::_('IP::NO');
  1757. -       } else {
  1758. -           return IP::_('IP::YES');
  1759. -       }
  1760. -   }
  1761. -   public function getReadableStartTime() {
  1762. -       $startTime = $this->getDateTimeObject('startTime');
  1763. -       if ($startTime) {
  1764. -           $startTimestamp = $startTime->getTimestamp();
  1765. -           return formatTime($startTime);
  1766. -       }
  1767. -   }
  1768. -  
  1769. -   public function getReadableEndTime() {
  1770. -       $endTime = $this->getDateTimeObject('endTime');
  1771. -       if ($endTime) {
  1772. -           $startTimestamp = $endTime->getTimestamp();
  1773. -           return formatTime($endTime);
  1774. -       }
  1775. -   }
  1776. -  
  1777. -   public function getAbstractForXml() {
  1778. -       $abstarct = '';
  1779. -       $approvedAbstract = $this->getApprovedAbstract();
  1780. -       if ($approvedAbstract) {
  1781. -           $abstarct = $approvedAbstract->text;
  1782. -       } else {
  1783. -           $abstarct = '';
  1784. -       }
  1785. -       return $abstarct;
  1786. -   }
  1787. -  
  1788. -   public function getFilesForXml() {
  1789. -       $files = array();
  1790. -       foreach ($this->SessionFiles as $file)
  1791. -       {                
  1792. -           $files[] = array(
  1793. -                       'file' => array(
  1794. -                           'title'         => $file->filename,
  1795. -                           'type'          => $file->filetype,
  1796. -                           'url'           => $file->url,
  1797. -                           'description'   => $file->description,
  1798. -                           'size'          => $file->filesize  
  1799. -                    )
  1800. -                );
  1801. -            
  1802. -       }
  1803. -       return $files;     
  1804. -   }
  1805. -  
  1806. -   public function getEvaluationQuestionsForXml()
  1807. -   {
  1808. -       $evaluationQuestions = array();
  1809. -       foreach ($this->SessionEvaluationQuestions as $qstn)
  1810. -       {
  1811. -           if ($qstn->SessionEvaluationQuestionConfig->questionType == SessionEvaluationQuestionConfigs::QUESTION_TYPE_RANKING) {
  1812. -               $value = $qstn->averageResponse;
  1813. -           } else if ($qstn->SessionEvaluationQuestionConfig->questionType == SessionEvaluationQuestionConfigs::QUESTION_TYPE_TEXT) {
  1814. -               $value = $qstn->notes;
  1815. -           }
  1816. -           $evaluationQuestions[] = array(
  1817. -               'EvaluationQuestion' => array(
  1818. -                   'global_question_id'    => $qstn->globalQuestionID,
  1819. -                    'label'                => $qstn->questionLabel,
  1820. -                   'value'                 => $value,
  1821. -                   'responses'             => $qstn->questionNumberOfResponses
  1822. -               )
  1823. -            );
  1824. +
  1825. +    public function getReadableEndTime() {
  1826. +        $endTime = $this->getDateTimeObject('endTime');
  1827. +        if ($endTime) {
  1828. +            $startTimestamp = $endTime->getTimestamp();
  1829. +            return formatTime($endTime);
  1830.          }
  1831. -      
  1832. -       return $evaluationQuestions;
  1833. -   }
  1834. -  
  1835. -   public function getAbstractApproved() {
  1836. -       return $this->AbstractHistories->getApprovedAbstract();
  1837. -   }
  1838. +    }
  1839. +
  1840. +    public function getAbstractApproved() {
  1841. +        return $this->AbstractHistories->getApprovedAbstract();
  1842. +    }
  1843. +
  1844. +    public function getAbstractLatest() {
  1845. +        return $this->AbstractHistories->getLatestAbstract();
  1846. +    }
  1847. +
  1848. +    public function getFileOverallStatus() {
  1849. +        return $this->fileOverallStatus;
  1850. +    }
  1851.  
  1852. -   public function getAbstractLatest() {
  1853. -       return $this->AbstractHistories->getLatestAbstract();
  1854. -   }
  1855. -   public function getFileOverallStatus() {
  1856. -       return $this->fileOverallStatus;
  1857. -   }
  1858.  }
  1859. diff --git a/model/SessionPerson.php b/model/SessionPerson.php
  1860. index d1e3a93..b74ec6b 100644
  1861. --- a/model/SessionPerson.php
  1862. +++ b/model/SessionPerson.php
  1863. @@ -5,7 +5,7 @@
  1864.   * @package Models
  1865.   * @subpackage Row
  1866.   */
  1867. -class SessionPerson extends IP_Db_Table_Row_EventAbstract implements XmlTransformable {
  1868. +class SessionPerson extends IP_Db_Table_Row_EventAbstract {
  1869.      protected $_usesCache = true;
  1870.  
  1871.      protected $_sendTemplateOnPersonAdd = false;
  1872. @@ -260,60 +260,5 @@ class SessionPerson extends IP_Db_Table_Row_EventAbstract implements XmlTransfor
  1873.         }
  1874.         parent::delete();
  1875.     }
  1876. -   public function save()
  1877. -    {
  1878. -       $this->generateXml();
  1879. -        parent::save();
  1880. -    }
  1881. -    
  1882. -   public function generateXml()
  1883. -   {
  1884. -       // don't generate on public side
  1885. -       if (IP::getInstance()->isPublic()) {
  1886. -           $this->getTableObject('CronObjectUpdates')->registerUpdate('SessionPersonnel', $this->recordID);
  1887. -           return;
  1888. -       }
  1889. -      
  1890. -       $time = microtime();
  1891. -       $service = new IP_Mapper_Service_SpeakersXmlFeed(array(), $this->getEvent());
  1892. -       $xml = $service->mapInstance($this);
  1893. -       $xmlTable = $this->getEvent()->getTableObject('XmlNodes');
  1894. -       $select = $xmlTable->select()->where('objectType = "SessionPersonnel"')
  1895. -                                    ->where('objectID = ?', $this->recordID)
  1896. -                                    ->where('parentNodeName = "SessionPersonnel"')
  1897. -                                    ->where('nodeName = "SessionPerson"');
  1898. -      
  1899. -      
  1900. -       if (!($sessionNode = $xmlTable->fetchRow($select))) {
  1901. -           $sessionNode = $xmlTable->createRow();
  1902. -           // @todo implement parent reference in a way that doesn't break when generating xml on update
  1903. -           $sessionNode->objectType = "SessionPersonnel";
  1904. -           $sessionNode->objectID = $this->recordID;
  1905. -       }
  1906. -      
  1907. -       $sessionNode->nodeName = 'SessionPerson';
  1908. -       $sessionNode->parentNodeName = 'SessionPersonnel';
  1909. -       $sessionNode->xmlString = $xml;
  1910. -       $sessionNode->save();
  1911. -   }
  1912. -  
  1913. -   public function getAdditionalQuestionsForXml()
  1914. -   {
  1915. -       $additionalQuestions = array();
  1916. -       foreach ($this->AdditionalQuestionResponses as $response)
  1917. -       {
  1918. -            if (!array_key_exists($response->questionID, $additionalQuestions)) {
  1919. -                $additionalQuestions[$response->questionID] = array(
  1920. -                    'AdditionalQuestion' => array(
  1921. -                        'questionID'    => $response->questionID,
  1922. -                        'questionLabel' => $response->getQuestionLabel(),
  1923. -                        'responses'     => array()
  1924. -                    )
  1925. -                );
  1926. -            }
  1927. -            $responseArray = array('value' => $response->getReadableString(), 'code' => $response->Option->globalAnswerID);
  1928. -            $additionalQuestions[$response->questionID]['AdditionalQuestion']['responses'][] = array('response' => $responseArray);
  1929. -       }
  1930. -       return $additionalQuestions;
  1931. -   }
  1932. +
  1933.  }
  1934. diff --git a/model/SessionPersonnel.php b/model/SessionPersonnel.php
  1935. index 269bb58..9ddebb9 100644
  1936. --- a/model/SessionPersonnel.php
  1937. +++ b/model/SessionPersonnel.php
  1938. @@ -5,7 +5,7 @@
  1939.   * @package Models
  1940.   * @subpackage Table
  1941.   */
  1942. -class SessionPersonnel extends IP_Db_Table_EventAbstract implements IP_Mappable_Interface, XmlTrackable
  1943. +class SessionPersonnel extends IP_Db_Table_EventAbstract implements IP_Mappable_Interface
  1944.  {
  1945.      protected $_excludedProtectedTableFields = array('recordID', 'publicChangesLocked', 'creationDate', 'profileID');
  1946.     protected $_rowClass = 'SessionPerson';
  1947. @@ -608,52 +608,4 @@ class SessionPersonnel extends IP_Db_Table_EventAbstract implements IP_Mappable_
  1948.         );
  1949.     }
  1950.    
  1951. -   public function selectNodesToUpdate($expirationTimeString = "-15 minutes", $limit = null, $offset = 0)
  1952. -   {
  1953. -       $dbName = $this->getEvent()->getDatabase();
  1954. -       $expiredTime = date('Y-m-d H:i:s', strtotime($expirationTimeString, time()));
  1955. -       $xmlTable = $this->getEvent()->getTableObject('XmlNodes');
  1956. -
  1957. -       $notInXmlSelect = "SELECT recordID FROM {$this->getSelectTableName()}
  1958. -                          WHERE recordID NOT IN (SELECT objectID FROM {$xmlTable->getSelectTableName()} WHERE objectType = 'SessionPersonnel' AND objectID IS NOT NULL)";
  1959. -      
  1960. -       $ids = array();
  1961. -       foreach (MyDb::getInstance()->fetchAll($notInXmlSelect) as $row)
  1962. -       {
  1963. -           $ids[] = $row['recordID'];
  1964. -       }
  1965. -                          
  1966. -       $expiredXmlSelect = "SELECT objectID FROM {$xmlTable->getSelectTableName()}
  1967. -                            WHERE objectType = 'SessionPersonnel' AND objectID IS NOT NULL
  1968. -                            AND modifiedDate <= '{$expiredTime}'";
  1969. -      
  1970. -       foreach (MyDb::getInstance()->fetchAll($expiredXmlSelect) as $row)
  1971. -       {
  1972. -           $ids[] = $row['objectID'];
  1973. -       }
  1974. -       if (!empty($ids)) {
  1975. -       $implodedIDs = implode(', ', $ids);
  1976. -      
  1977. -       $expiredSelect = $this->select()->from(array('reg'=>self::TABLE), array('*'), $dbName)
  1978. -                                       ->where("reg.recordID IN ($implodedIDs)");     
  1979. -       }   else {
  1980. -            return null;
  1981. -          
  1982. -       }                                                      
  1983. -        if ($limit) {
  1984. -            $expiredSelect->limit($limit, $offset);
  1985. -        }
  1986. -                                      
  1987. -        return $expiredSelect;
  1988. -      
  1989. -   }
  1990. -  
  1991. -   public function refreshNodes($expirationTimeString = "-15 minutes", $limit = null, $offset = 0)
  1992. -   {
  1993. -       foreach ($this->fetchAll($this->selectNodesToUpdate($expirationTimeString, $limit, $offset)) as $speaker)
  1994. -       {
  1995. -           $speaker->generateXml();
  1996. -       }
  1997. -   }
  1998. -  
  1999.  }
  2000. diff --git a/model/Sessions.php b/model/Sessions.php
  2001. index 9a4e216..f83afde 100644
  2002. --- a/model/Sessions.php
  2003. +++ b/model/Sessions.php
  2004. @@ -5,7 +5,7 @@
  2005.   * @package Models
  2006.   * @subpackage Table
  2007.   */
  2008. -class Sessions extends IP_Db_Table_EventAbstractCalendarObject implements IP_Mappable_Interface, XmlTrackable
  2009. +class Sessions extends IP_Db_Table_EventAbstractCalendarObject implements IP_Mappable_Interface
  2010.  {
  2011.      protected $_excludedProtectedTableFields = array('creationDate', 'recordID');
  2012.     protected $_rowClass    = 'Session';
  2013. @@ -21,6 +21,7 @@ class Sessions extends IP_Db_Table_EventAbstractCalendarObject implements IP_Map
  2014.     const LABEL_SCHEDULED       = 'Scheduled';
  2015.     const LABEL_STATUS          = 'Status';
  2016.     const LABEL_TITLE           = 'Title';
  2017. +   const LABEL_POINTS          = 'Points';
  2018.     const LABEL_NUMBER          = 'Number';
  2019.     const LABEL_TYPEID          = 'Type';
  2020.     const LABEL_PROGRAMID       = 'Program';
  2021. @@ -203,6 +204,7 @@ class Sessions extends IP_Db_Table_EventAbstractCalendarObject implements IP_Map
  2022.         $this->addColumn('modifiedDate',self::DATETIME);
  2023.         $this->addColumn('objectCreated', self::DATE);
  2024.         $this->addColumn('objectModified', self::DATE);
  2025. +       $this->addColumn('points', self::SMALLINT);
  2026.         return true;
  2027.     }
  2028.  
  2029. @@ -1113,60 +1115,11 @@ class Sessions extends IP_Db_Table_EventAbstractCalendarObject implements IP_Map
  2030.         }
  2031.         return implode(', ' , $registrationWorkshopTitles);
  2032.      }
  2033. -    
  2034. -   public function getSubTemplateTypes() {
  2035. -       return array(array('name'=>'Sessions', 'context'=>'SessionManagementPerson.SessionPerson.Sessions', 'description'=>'When included in a template, this sub-template will be repeated for each Session.'));
  2036. -   }
  2037. -   public function enableSubTemplates() {
  2038. -       return true;
  2039. -   }
  2040. -    
  2041. -   public function selectNodesToUpdate($expirationTimeString = "-15 minutes", $limit = null, $offset = 0)
  2042. -   {
  2043. -       $dbName = $this->getEvent()->getDatabase();
  2044. -       $expiredTime = date('Y-m-d H:i:s', strtotime($expirationTimeString, time()));
  2045. -       $xmlTable = $this->getEvent()->getTableObject('XmlNodes');
  2046. -
  2047. -       $notInXmlSelect = "SELECT recordID FROM {$this->getSelectTableName()}
  2048. -                          WHERE recordID NOT IN (SELECT objectID FROM {$xmlTable->getSelectTableName()} WHERE objectType = 'Sessions' AND objectID IS NOT NULL)";
  2049. -      
  2050. -       $ids = array();
  2051. -       foreach (MyDb::getInstance()->fetchAll($notInXmlSelect) as $row)
  2052. -       {
  2053. -           $ids[] = $row['recordID'];
  2054. -       }
  2055. -                          
  2056. -       $expiredXmlSelect = "SELECT objectID FROM {$xmlTable->getSelectTableName()}
  2057. -                            WHERE objectType = 'Sessions' AND objectID IS NOT NULL
  2058. -                            AND modifiedDate <= '{$expiredTime}'";
  2059. -      
  2060. -       foreach (MyDb::getInstance()->fetchAll($expiredXmlSelect) as $row)
  2061. -       {
  2062. -           $ids[] = $row['objectID'];
  2063. -       }
  2064. -       if (!empty($ids)) {
  2065. -       $implodedIDs = implode(', ', $ids);
  2066. -      
  2067. -       $expiredSelect = $this->select()->from(array('reg'=>self::TABLE), array('*'), $dbName)
  2068. -                                       ->where("reg.recordID IN ($implodedIDs)");     
  2069. -       }   else {
  2070. -            return null;
  2071. -          
  2072. -       }                                                      
  2073. -        if ($limit) {
  2074. -            $expiredSelect->limit($limit, $offset);
  2075. -        }
  2076. -                                      
  2077. -        return $expiredSelect;
  2078. -      
  2079. -   }
  2080. -  
  2081. -   public function refreshNodes($expirationTimeString = "-15 minutes", $limit = null, $offset = 0)
  2082. -   {
  2083. -       foreach ($this->fetchAll($this->selectNodesToUpdate($expirationTimeString, $limit, $offset)) as $session)
  2084. -       {
  2085. -           $session->generateXml();
  2086. -       }
  2087. -   }
  2088.  
  2089. +    public function getSubTemplateTypes() {
  2090. +        return array(array('name'=>'Sessions', 'context'=>'SessionManagementPerson.SessionPerson.Sessions', 'description'=>'When included in a template, this sub-template will be repeated for each Session.'));
  2091. +    }
  2092. +    public function enableSubTemplates() {
  2093. +        return true;
  2094. +    }
  2095.  }
  2096. diff --git a/phing/classes/RefreshXml.php b/phing/classes/RefreshXml.php
  2097. index ddb3d40..27b4948 100644
  2098. --- a/phing/classes/RefreshXml.php
  2099. +++ b/phing/classes/RefreshXml.php
  2100. @@ -98,14 +98,10 @@ class RefreshXml extends Task
  2101.         $expirationString = "-{$this->expirationTime} minutes";
  2102.        
  2103.         $countSelect = $table->selectNodesToUpdate();
  2104. -       if($countSelect) {
  2105.         $countSelect->reset(Zend_Db_Select::COLUMNS);
  2106.         $countSelect->columns('count(reg.recordID)');
  2107. -       $this->log($countSelect);
  2108.         $count = MyDb::getInstance()->fetchOne($countSelect);
  2109. -       } else {
  2110. -           $count = 0;
  2111. -       }
  2112. +      
  2113.         $this->log(sprintf('%s: Processing %d %s', $event->url, $count, $this->class));
  2114.        
  2115.         for ($i = 0; $i <= ((int)$count/100); $i++)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement