Example #1
0
 /**
  * Restore divs states.
  *
  * @param Page $page
  */
 public function _restoreDivStates($page)
 {
     $postvars = $this->m_ownerInstance->m_postvars;
     if (!isset($postvars['divstate']) || !is_array($postvars['divstate']) || sizeof($postvars['divstate']) == 0) {
         return;
     }
     $divstate = $postvars['divstate'];
     $onLoadScript = '';
     foreach ($divstate as $key => $value) {
         $key = substr($key, 2, -2);
         if ($value == 'opened') {
             $onLoadScript .= "profile_swapProfileDiv('{$key}');";
         }
     }
     $page->register_loadscript($onLoadScript);
 }