Example #1
0
 /**
  * Returns the uri from the given page
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translatePageToUri($page)
 {
     list($class, $method, $id) = explode('/', $page);
     if ($method == 'create') {
         $uri = '/' . $this->shortClassName . '/create.php';
         return $uri;
     }
     if ($method == 'showChanges') {
         $uri = '/' . $this->shortClassName . '/showChanges.php';
         return $uri;
     }
     if ($method == 'prepareCommit') {
         $uri = '/' . $this->shortClassName . '/prepareCommit.php';
         return $uri;
     }
     return parent::translatePageToUri($page);
 }
 /**
  * Returns the uri from the given page
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translatePageToUri($page)
 {
     if ($page == $this->shortClassName . '/changer/') {
         $uri = '/' . $this->shortClassName . '/changer.php';
         return $uri;
     }
     return parent::translatePageToUri($page);
 }
 /**
  * Returns the uri from the given page
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translatePageToUri($page)
 {
     list($class, $method, $id) = explode('/', $page);
     if ($method == 'editImage') {
         return '/' . $this->shortClassName . '/editImage/' . $id . '.php';
     }
     return parent::translatePageToUri($page);
 }
Example #4
0
 /**
  * Returns the page from the given uri
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translateUriToPage($uri)
 {
     $index = array('/', '/index.php', '/index.php3', '/index.htm', '/index.html');
     if (in_array($uri, $index)) {
         // We check if there is an history
         if (!isset($_SESSION[__CLASS__]['introPageShown'])) {
             // We check if there is an intro page
             if ($this->getParam('intro>activated', false)) {
                 sh_cache::disable();
                 $page = $this->getParam('intro>class') . '/' . $this->getParam('intro>method') . '/';
                 $page .= $this->getParam('intro>id', '');
                 $_SESSION[__CLASS__]['introPageShown'] = true;
                 return $page;
             }
             $_SESSION[__CLASS__]['introPageShown'] = true;
         }
         $page = $this->getParam('class') . '/' . $this->getParam('action') . '/';
         $page .= $this->getParam('id', '');
         return $page;
     }
     if ($uri == '/' . $this->shortClassName . '/' . $this->getI18n('choose_uri') . '.php') {
         $page = $this->shortClassName . '/choose/';
         return $page;
     }
     return parent::translatePageToUri($page);
 }
 /**
  * Returns the uri from the given page
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translatePageToUri($page)
 {
     list($class, $method, $id) = explode('/', $page);
     if ($method == 'chooseLink') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/chooseLink.php';
     }
     if ($method == 'insertVideo') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/insertVideo.php';
     }
     if ($method == 'insertDiaporama') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/insertDiaporama.php';
     }
     if ($method == 'image') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/image.php';
     }
     if ($method == 'addBlock') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/addBlock.php';
     }
     return parent::translatePageToUri($page);
 }
 /**
  * Returns the uri from the given page
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translatePageToUri($page)
 {
     list($class, $method, $id) = explode('/', $page);
     if ($method == 'change') {
         $uri = '/' . $this->shortClassName . '/' . $this->getI18n('change_uri') . '.php';
         return $uri;
     }
     return parent::translatePageToUri($page);
 }
Example #7
0
 /**
  * Returns the uri from the given page
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translatePageToUri($page)
 {
     list($class, $method, $id) = explode('/', $page);
     if ($method == 'edit') {
         return '/menu/edit/' . $id . '.php';
     }
     if ($method == 'verifyLength') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/verifyLength.php';
     }
     if ($method == 'addEntry') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/addEntry.php';
     }
     if ($method == 'chooseLink') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/chooseLink.php';
     }
     if ($method == 'unpack_button_type') {
         // To change this, we also have to do it in menuEditor.js
         return '/menu/unpack_button_type.php';
     }
     return parent::translatePageToUri($page);
 }
Example #8
0
 /**
  * Returns the uri from the given page
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translatePageToUri($page)
 {
     list($class, $method, $id) = explode('/', $page);
     if ($method == 'configure') {
         $uri = '/' . $this->shortClassName . '/configure.php';
         return $uri;
     }
     if ($method == 'prepareCommit') {
         $uri = '/' . $this->shortClassName . '/prepareCommit.php';
         return $uri;
     }
     if ($method == 'showProject') {
         $uri = '/' . $this->shortClassName . '/showProject.php';
         return $uri;
     }
     if ($method == 'showFileHistory') {
         $uri = '/' . $this->shortClassName . '/showFileHistory.php';
         return $uri;
     }
     if ($method == 'test') {
         $uri = '/' . $this->shortClassName . '/test.php';
         return $uri;
     }
     if ($method == 'showCheckList') {
         $uri = '/' . $this->shortClassName . '/showCheckList.php';
         return $uri;
     }
     return parent::translatePageToUri($page);
 }
 /**
  * Returns the uri from the given page
  * @param string $page The page we want to translate to uri
  * @return string|bool The uri, or false
  */
 public function translatePageToUri($page)
 {
     list($class, $method, $id) = explode('/', $page);
     if ($method == 'add') {
         $uri = '/' . $this->shortClassName . '/add.php';
         return $uri;
     }
     return parent::translatePageToUri($page);
 }