Facebook
From Chocolate Marmoset, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 297
  1. * @param array $models a list of model objects. This parameter
  2. 2067      * can also be an array of associative arrays (e.g. results of {@link CDbCommand::queryAll}).
  3. 2068      * @param mixed $valueField the attribute name or anonymous function (PHP 5.3+) for list option values
  4. 2069      * @param mixed $textField the attribute name or anonymous function (PHP 5.3+) for list option texts
  5. 2070      * @param mixed $groupField the attribute name or anonymous function (PHP 5.3+) for list option group names. If empty, no group will be generated.
  6. 2071      * @return array the list data that can be used in {@link dropDownList}, {@link listBox}, etc.
  7. 2072      */
  8. 2073     public static function listData($models,$valueField,$textField,$groupField='')
  9. 2074     {
  10. 2075         $listData=array();
  11. 2076         if($groupField==='')
  12. 2077         {
  13. 2078             foreach($models as $model)
  14. 2079             {
  15. 2080                 $value=self::value($model,$valueField);
  16. 2081                 $text=self::value($model,$textField);
  17. 2082                 $listData[$value]=$text;
  18. 2083             }
  19. 2084         }
  20. 2085         else
  21. 2086         {
  22. 2087             foreach($models as $model)
  23. 2088             {
  24. 2089                 $group=self::value($model,$groupField);
  25. 2090                 $value=self::value($model,$valueField);
  26. Stack Trace
  27. #0     
  28. –  /home/p488817/public_html/banycsgo.gohell.eu/application/models/SBAdmin.php(357): CHtml::listData(null, "name", "name")
  29. 352      * @param mixed $name permission name(s) to check for
  30. 353      * @return boolean whether the admin has one of these web permissions
  31. 354      */
  32. 355     public function hasPermission($name)
  33. 356     {
  34. 357         $permissions = CHtml::listData($this->group->permissions, 'name', 'name');
  35. 358         if(isset($permissions['OWNER']))
  36. 359             return true;
  37. 360        
  38. 361         $names = is_array($name) ? $name : func_get_args();
  39. 362         foreach($names as $name)
  40. #1     
  41. –  /home/p488817/public_html/banycsgo.gohell.eu/themes/bootstrap/views/default/bans.php(12): SBAdmin->hasPermission("OWNER")
  42. 07 /* @var $search string */
  43. 08 /* @var $total_bans integer */
  44. 09 ?>
  45. 10
  46. 11 <?php $summaryText = CHtml::link($hideInactive == 'true' ? Yii::t('sourcebans', 'Show inactive bans') : Yii::t('sourcebans', 'Hide inactive bans'), array('', 'hideinactive' => $hideInactive == 'true' ? 'false' : 'true')) . ' | <em>' . Yii::t('sourcebans', 'Total bans') . ': ' . $total_bans . '</em>'; ?>
  47. 12 <?php if(SourceBans::app()->settings->bans_public_export || (!Yii::app()->user->isGuest && Yii::app()->user->data->hasPermission("OWNER"))): ?>
  48. 13 <?php $summaryText = '<div class="pull-left">' . CHtml::link(Yii::t('sourcebans', 'Export permanent Steam ID bans'), array('bans/export', 'type' => 'steam')) . ' | ' . CHtml::link(Yii::t('sourcebans', 'Export permanent IP address bans'), array('bans/export', 'type' => 'ip')) . '</div>' . $summaryText; ?>
  49. 14 <?php endif ?>
  50. 15
  51. 16     <section>
  52. 17       <div class="container" style="margin-bottom: 1em; width: 500px;">
  53. #2     
  54. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CBaseController.php(126): require("/home/p488817/public_html/banycsgo.gohell.eu/themes/bootstrap/vi...")
  55. 121             $data=$_data_;
  56. 122         if($_return_)
  57. 123         {
  58. 124             ob_start();
  59. 125             ob_implicit_flush(false);
  60. 126             require($_viewFile_);
  61. 127             return ob_get_clean();
  62. 128         }
  63. 129         else
  64. 130             require($_viewFile_);
  65. 131     }
  66. #3     
  67. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CBaseController.php(95): CBaseController->renderInternal("/home/p488817/public_html/banycsgo.gohell.eu/themes/bootstrap/vi...", array("ban" => SBBan, "bans" => SBBan, "comment" => SBComment, "hideInactive" => false, ...), true)
  68. 090     {
  69. 091         $widgetCount=count($this->_widgetStack);
  70. 092         if(($renderer=Yii::app()->getViewRenderer())!==null && $renderer->fileExtension==='.'.CFileHelper::getExtension($viewFile))
  71. 093             $content=$renderer->renderFile($this,$viewFile,$data,$return);
  72. 094         else
  73. 095             $content=$this->renderInternal($viewFile,$data,$return);
  74. 096         if(count($this->_widgetStack)===$widgetCount)
  75. 097             return $content;
  76. 098         else
  77. 099         {
  78. 100             $widget=end($this->_widgetStack);
  79. #4     
  80. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CController.php(869): CBaseController->renderFile("/home/p488817/public_html/banycsgo.gohell.eu/themes/bootstrap/vi...", array("ban" => SBBan, "bans" => SBBan, "comment" => SBComment, "hideInactive" => false, ...), true)
  81. 864      */
  82. 865     public function renderPartial($view,$data=null,$return=false,$processOutput=false)
  83. 866     {
  84. 867         if(($viewFile=$this->getViewFile($view))!==false)
  85. 868         {
  86. 869             $output=$this->renderFile($viewFile,$data,true);
  87. 870             if($processOutput)
  88. 871                 $output=$this->processOutput($output);
  89. 872             if($return)
  90. 873                 return $output;
  91. 874             else
  92. #5     
  93. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CController.php(782): CController->renderPartial("bans", array("ban" => SBBan, "bans" => SBBan, "comment" => SBComment, "hideInactive" => false, ...), true)
  94. 777      */
  95. 778     public function render($view,$data=null,$return=false)
  96. 779     {
  97. 780         if($this->beforeRender($view))
  98. 781         {
  99. 782             $output=$this->renderPartial($view,$data,true);
  100. 783             if(($layoutFile=$this->getLayoutFile($this->layout))!==false)
  101. 784                 $output=$this->renderFile($layoutFile,array('content'=>$output),true);
  102. 785
  103. 786             $this->afterRender($view,$output);
  104. 787
  105. #6     
  106. –  /home/p488817/public_html/banycsgo.gohell.eu/application/controllers/DefaultController.php(147): CController->render("bans", array("ban" => SBBan, "bans" => SBBan, "comment" => SBComment, "hideInactive" => false, ...))
  107. 142             'hideInactive' => $hideInactive,
  108. 143             'search' => $search,
  109. 144             'total_bans' => SBBan::model()->count(array(
  110. 145                 'scopes' => $hideInactive ? 'active' : null,
  111. 146             )),
  112. 147         ));
  113. 148     }
  114. 149
  115. 150     /**
  116. 151      * Displays the servers page
  117. 152      */
  118. #7     
  119. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/actions/CInlineAction.php(49): DefaultController->actionBans()
  120. 44         $controller=$this->getController();
  121. 45         $method=new ReflectionMethod($controller, $methodName);
  122. 46         if($method->getNumberOfParameters()>0)
  123. 47             return $this->runWithParamsInternal($controller, $method, $params);
  124. 48         else
  125. 49             return $controller->$methodName();
  126. 50     }
  127. 51
  128. 52 }
  129. #8     
  130. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CController.php(308): CInlineAction->runWithParams(array())
  131. 303     {
  132. 304         $priorAction=$this->_action;
  133. 305         $this->_action=$action;
  134. 306         if($this->beforeAction($action))
  135. 307         {
  136. 308             if($action->runWithParams($this->getActionParams())===false)
  137. 309                 $this->invalidActionParams($action);
  138. 310             else
  139. 311                 $this->afterAction($action);
  140. 312         }
  141. 313         $this->_action=$priorAction;
  142. #9     
  143. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)
  144. 128             $filter=$this->itemAt($this->filterIndex++);
  145. 129             Yii::trace('Running filter '.($filter instanceof CInlineFilter ? get_class($this->controller).'.filter'.$filter->name.'()':get_class($filter).'.filter()'),'system.web.filters.CFilterChain');
  146. 130             $filter->filter($this);
  147. 131         }
  148. 132         else
  149. 133             $this->controller->runAction($this->action);
  150. 134     }
  151. 135 }
  152. #10    
  153. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/filters/CFilter.php(40): CFilterChain->run()
  154. 35      */
  155. 36     public function filter($filterChain)
  156. 37     {
  157. 38         if($this->preFilter($filterChain))
  158. 39         {
  159. 40             $filterChain->run();
  160. 41             $this->postFilter($filterChain);
  161. 42         }
  162. 43     }
  163. 44
  164. 45     /**
  165. #11    
  166. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CController.php(1145): CFilter->filter(CFilterChain)
  167. 1140      */
  168. 1141     public function filterAccessControl($filterChain)
  169. 1142     {
  170. 1143         $filter=new CAccessControlFilter;
  171. 1144         $filter->setRules($this->accessRules());
  172. 1145         $filter->filter($filterChain);
  173. 1146     }
  174. 1147
  175. 1148     /**
  176. 1149      * Returns a persistent page state value.
  177. 1150      * A page state is a variable that is persistent across POST requests of the same page.
  178. #12    
  179. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/filters/CInlineFilter.php(58): CController->filterAccessControl(CFilterChain)
  180. 53      * @param CFilterChain $filterChain the filter chain that the filter is on.
  181. 54      */
  182. 55     public function filter($filterChain)
  183. 56     {
  184. 57         $method='filter'.$this->name;
  185. 58         $filterChain->controller->$method($filterChain);
  186. 59     }
  187. 60 }
  188. #13    
  189. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter(CFilterChain)
  190. 125     {
  191. 126         if($this->offsetExists($this->filterIndex))
  192. 127         {
  193. 128             $filter=$this->itemAt($this->filterIndex++);
  194. 129             Yii::trace('Running filter '.($filter instanceof CInlineFilter ? get_class($this->controller).'.filter'.$filter->name.'()':get_class($filter).'.filter()'),'system.web.filters.CFilterChain');
  195. 130             $filter->filter($this);
  196. 131         }
  197. 132         else
  198. 133             $this->controller->runAction($this->action);
  199. 134     }
  200. 135 }
  201. #14    
  202. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CController.php(291): CFilterChain->run()
  203. 286             $this->runAction($action);
  204. 287         else
  205. 288         {
  206. 289             $priorAction=$this->_action;
  207. 290             $this->_action=$action;
  208. 291             CFilterChain::create($this,$action,$filters)->run();
  209. 292             $this->_action=$priorAction;
  210. 293         }
  211. 294     }
  212. 295
  213. 296     /**
  214. #15    
  215. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array("accessControl"))
  216. 260         {
  217. 261             if(($parent=$this->getModule())===null)
  218. 262                 $parent=Yii::app();
  219. 263             if($parent->beforeControllerAction($this,$action))
  220. 264             {
  221. 265                 $this->runActionWithFilters($action,$this->filters());
  222. 266                 $parent->afterControllerAction($this,$action);
  223. 267             }
  224. 268         }
  225. 269         else
  226. 270             $this->missingAction($actionID);
  227. #16    
  228. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CWebApplication.php(282): CController->run("bans")
  229. 277         {
  230. 278             list($controller,$actionID)=$ca;
  231. 279             $oldController=$this->_controller;
  232. 280             $this->_controller=$controller;
  233. 281             $controller->init();
  234. 282             $controller->run($actionID);
  235. 283             $this->_controller=$oldController;
  236. 284         }
  237. 285         else
  238. 286             throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
  239. 287                 array('{route}'=>$route===''?$this->defaultController:$route)));
  240. #17    
  241. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/web/CWebApplication.php(141): CWebApplication->runController("default/bans")
  242. 136             foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
  243. 137                 $_GET[$name]=$value;
  244. 138         }
  245. 139         else
  246. 140             $route=$this->getUrlManager()->parseUrl($this->getRequest());
  247. 141         $this->runController($route);
  248. 142     }
  249. 143
  250. 144     /**
  251. 145      * Registers the core application components.
  252. 146      * This method overrides the parent implementation by registering additional core components.
  253. #18    
  254. –  /home/p488817/public_html/banycsgo.gohell.eu/framework/base/CApplication.php(180): CWebApplication->processRequest()
  255. 175     public function run()
  256. 176     {
  257. 177         if($this->hasEventHandler('onBeginRequest'))
  258. 178             $this->onBeginRequest(new CEvent($this));
  259. 179         register_shutdown_function(array($this,'end'),0,false);
  260. 180         $this->processRequest();
  261. 181         if($this->hasEventHandler('onEndRequest'))
  262. 182             $this->onEndRequest(new CEvent($this));
  263. 183     }
  264. 184
  265. 185     /**
  266. #19    
  267. –  /home/p488817/public_html/banycsgo.gohell.eu/index.php(16): CApplication->run()
  268. 11 defined('YII_DEBUG') or define('YII_DEBUG',true);
  269. 12 // specify how many levels of call stack should be shown in each log message
  270. 13 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
  271. 14
  272. 15 require_once($yii);
  273. 16 Yii::createWebApplication($config)->run();
  274. 2017-10-27 20:30:48 Apache mod_qos/10.10 mod_bwlimited/1.4 Yii Framework/1.1.14