Changeset 515
- Timestamp:
- Apr 8, 2013, 11:15:52 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/User.php
r493 r515 113 113 else 114 114 { 115 // Je uživatel registrován?115 // Is user registred yet? 116 116 $Query = $this->Database->select('User', '*', 'Login = "'.$Login.'"'); 117 117 if($Query->num_rows > 0) $Result = LOGIN_USED; … … 138 138 $NewPassword = substr(sha1(strtoupper($Login)), 0, 7); 139 139 140 // Send activation mail to user email 140 141 $Mail = new Mail(); 141 142 $Mail->Subject = 'Registrace nového účtu'; … … 194 195 $this->Database->update('User', 'Id='.$Row['Id'], array('LastLoginTime' => 'NOW()', 'LastIpAddress' => GetRemoteAddress())); 195 196 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => $Row['Id'])); 196 // načtení stavu stromu197 197 198 $Result = USER_LOGGED_IN; 198 199 $this->Check(); … … 289 290 function CheckPermission($Module, $Operation, $ItemType = '', $ItemIndex = 0) 290 291 { 291 //echo('Check '.$Module.' '.$Operation.' '.$ItemType.' '.$ItemIndex);292 //293 292 // First try to check cache 294 293 if(in_array(array($Module, $Operation, $ItemType, $ItemType), $this->PermissionCache)) … … 315 314 if($PermissionExists) 316 315 { 316 if($this->User['Id'] == null) $UserCondition = '(`User` IS NULL)'; 317 else $UserCondition = '(`User`="'.$this->User['Id'].'")'; 317 318 // Check user-operation relation 318 $DbResult = $this->Database->select('PermissionUserAssignment', '*', '`User`="'.$this->User['Id'].'" AND `AssignedOperation`="'.$OperationId.'"');319 $DbResult = $this->Database->select('PermissionUserAssignment', '*', $UserCondition.' AND (`AssignedOperation`="'.$OperationId.'")'); 319 320 if($DbResult->num_rows > 0) return(true); 320 321 321 322 // Check user-group relation 322 $DbResult = $this->Database->select('PermissionUserAssignment', 'AssignedGroup', '`User`="'.$this->User['Id'].'"');323 $DbResult = $this->Database->select('PermissionUserAssignment', 'AssignedGroup', $UserCondition); 323 324 while($DbRow = $DbResult->fetch_array()) 324 325 { -
trunk/Common/Version.php
r514 r515 1 1 <?php 2 2 3 $Revision = 51 4; // Subversion revision4 $DatabaseRevision = 5 07;3 $Revision = 515; // Subversion revision 4 $DatabaseRevision = 515; 5 5 $ReleaseTime = '2013-04-08'; 6 6 -
trunk/Modules/News/NewsPage.php
r512 r515 99 99 if($this->System->Modules['User']->CheckPermission('News', 'Insert', 'Group', $Category)) 100 100 { 101 //print_r($_FILES);102 101 // Process uploaded file 103 102 $EnclosureFileNames = array('enclosure1', 'enclosure2', 'enclosure3'); … … 156 155 $this->Database->update('News', 'Id='.$_POST['id'], array('Title' => $_POST['title'], 'Content' => $_POST['content'])); 157 156 $Output .= 'Aktualita uložena!<br />'; 158 $Output .= '<a href="index.php?category='.$Category.'">Zpět na seznam aktualit</a>';157 $Output .= '<a href="index.php?category='.$Category.'">Zpět na seznam aktualit</a>'; 159 158 } else $Output .= 'Nelze měnit cizí aktualitu!<br />'; 160 159 } else $Output .= 'ID nenalezeno!'; -
trunk/Modules/Portal/Portal.php
r512 r515 26 26 global $Config; 27 27 28 $this->Database->select_db($Config['Database']['Database']);29 30 28 $Output2 = ''; 31 29 … … 307 305 } 308 306 309 $this->Database->select_db($Config['Database']['Database']);310 311 307 $DbResult = $this->Database->query('SELECT * FROM `HyperlinkGroup`'); 312 308 while($DbRow = $DbResult->fetch_assoc()) -
trunk/Readme.txt
r507 r515 34 34 35 35 htmldoc - Pro generování PDF z HTML 36 php-pecl-Fileinfo - pro zjištění MIME type ze souboru37 36 38 37 6) Speedtest -
trunk/admin/Updates.php
r509 r515 229 229 } 230 230 231 function UpdateTo515($Manager) 232 { 233 $Manager->Execute("ALTER TABLE `PermissionUserAssignment` CHANGE `User` `User` INT( 11 ) NULL"); 234 } 235 231 236 $Updates = array( 232 237 491 => array('Revision' => 493, 'Function' => 'UpdateTo493'), 233 238 493 => array('Revision' => 494, 'Function' => 'UpdateTo494'), 234 239 494 => array('Revision' => 495, 'Function' => 'UpdateTo495'), … … 240 245 502 => array('Revision' => 505, 'Function' => 'UpdateTo505'), 241 246 505 => array('Revision' => 507, 'Function' => 'UpdateTo507'), 247 507 => array('Revision' => 515, 'Function' => 'UpdateTo515'), 242 248 ); 243 249
Note:
See TracChangeset
for help on using the changeset viewer.