Changeset 3199
- Timestamp:
- 09/01/10 16:28:19 (14 years ago)
- Location:
- branches/2.2/jabberit_messenger
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/jabberit_messenger/controller.php
r3102 r3199 7 7 ); 8 8 } 9 9 10 require_once '../header.session.inc.php'; 10 11 … … 25 26 } 26 27 27 require_once dirname(__FILE__) . '/inc/Controller.class.php'; 28 if( file_exists(dirname(__FILE__) . "/inc/Controller.class.php") ) 29 { 30 require_once dirname(__FILE__) . '/inc/Controller.class.php'; 28 31 29 $controller = new Controller; 30 printf("%s", $controller->exec($$request_method)); 32 $controller = new Controller(); 33 printf("%s", $controller->exec($$request_method, dirname(__FILE__))); 34 exit(0); 35 } 31 36 32 exit(0);33 37 ?> -
branches/2.2/jabberit_messenger/inc/Controller.class.php
r3102 r3199 26 26 27 27 private $fatalError = false; 28 private $_PATH = ""; 28 29 29 30 public function __construct() … … 89 90 { 90 91 case 'exec' : 91 return $this->_exec($arguments[0] );92 return $this->_exec($arguments[0], $arguments[1]); 92 93 break; 93 94 default : return "Method not avaible"; … … 100 101 } 101 102 102 private final function _exec(array &$pRequest )103 private final function _exec(array &$pRequest, $pPath) 103 104 { 104 105 ( $pRequest[$this->string_access] ) … … 133 134 and die(__CLASS__ . ' [ ERROR #14 ] :: invalid reference "' . $ref . '"'); 134 135 135 $path = $section_itens->item($i)->getAttribute('path') 136 or $path = $section->getAttribute('path') 137 or die(__CLASS__ . ' [ ERROR #15 ] :: bad path argument'); 136 if( $section_itens->item($i)->getAttribute('path') ) 137 $path = $section_itens->item($i)->getAttribute('path'); 138 else if ( $section->getAttribute('path') ) 139 $path = $pPath . $section->getAttribute('path'); 140 141 if( !$path ) die(__CLASS__ . ' [ ERROR #15 ] :: bad path argument'); 138 142 139 143 $prefix = $section_itens->item($i)->getAttribute('prefix') … … 188 192 189 193 $file = "{$pPath}/{$pPrefix}{$js}{$pSuffix}"; 190 //$file = "../jabberit_messenger/{$pPath}/{$pPrefix}{$js}{$pSuffix}";191 194 192 195 file_exists($file) 193 or die(__CLASS__ . ' [ ERROR #19 ] :: the file that has the class was not opened' );196 or die(__CLASS__ . ' [ ERROR #19 ] :: the file that has the class was not opened' . $file ); 194 197 195 198 $debug = $pSectionItem->parentNode->getAttribute('debug'); 196 199 197 200 return file_get_contents($file); 198 199 201 } 200 202 } -
branches/2.2/jabberit_messenger/inc/controller.xml
r3102 r3199 17 17 <controller-sections> 18 18 <css></css> 19 <js path="/ var/www/expresso/jabberit_messenger/js" suffix=".js">19 <js path="/js" suffix=".js"> 20 20 <item ref="connector" js="connector" /> 21 21 <item ref="editSelect" js="editSelect" /> … … 31 31 <item ref="makeW" js="makeW" /> 32 32 </js> 33 <php path="/ var/www/expresso/jabberit_messenger/inc" suffix=".class.php">33 <php path="/inc" suffix=".class.php"> 34 34 <item ref="contacts_im" alias="getParticipantsExternal" class="contacts_im" method="getParticipantsExternal" prefix="class." suffix=".inc.php"/> 35 35 <item ref="contacts_im" alias="list_contacts" class="contacts_im" method="list_contacts" prefix="class." suffix=".inc.php"/> -
branches/2.2/jabberit_messenger/inc/jabberit_acl.inc.php
r3102 r3199 91 91 'j.editSelect' 92 92 ); 93 93 94 94 require_once dirname(__FILE__) . '/Controller.class.php'; 95 95 … … 99 99 foreach( $js as $key => $val ) 100 100 { 101 $script .= $controller->exec(array('act' => $val) );101 $script .= $controller->exec(array('act' => $val), substr(dirname(__FILE__), 0, strlen( dirname(__FILE__) )-4)); 102 102 } 103 103
Note: See TracChangeset
for help on using the changeset viewer.