- Timestamp:
- Feb 20, 2014 3:03:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/branches/eli_branch merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/bin/acl.cli.php
r415 r468 5 5 * For details visit the project site: <http://trac.strangecode.com/codebase/> 6 6 * Copyright 2001-2012 Strangecode, LLC 7 * 7 * 8 8 * This file is part of The Strangecode Codebase. 9 9 * … … 12 12 * Free Software Foundation, either version 3 of the License, or (at your option) 13 13 * any later version. 14 * 14 * 15 15 * The Strangecode Codebase is distributed in the hope that it will be useful, but 16 16 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 18 * details. 19 * 19 * 20 20 * You should have received a copy of the GNU General Public License along with 21 21 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 113 113 break; 114 114 case 'all' : 115 listObjects('root', 'aro'); 116 listObjects('root', 'aco'); 115 listObjects('root', 'aro'); 116 listObjects('root', 'aco'); 117 117 listObjects('root', 'axo'); 118 118 break; … … 238 238 but could just as easily be SPICES -> CUISINES -> DISHES. A privilege is 239 239 allowed if a user (ARO) can perform an action (ACO) on something (AXO). 240 For example, with an `ARO->ACO->AXO` of `Bob->edit->4`, Bob can edit article 4. 241 If the AXO were omitted (i.e. just `Bob->edit`), this becomes "Bob can edit" 240 For example, with an `ARO->ACO->AXO` of `Bob->edit->4`, Bob can edit article 4. 241 If the AXO were omitted (i.e. just `Bob->edit`), this becomes "Bob can edit" 242 242 (he can edit any object). 243 243 244 Each access object is stored as a node in hierarchical tree structures. 244 Each access object is stored as a node in hierarchical tree structures. 245 245 A permission granted to a node is applied to all its children. If a child 246 246 node is specified a different permission that is more specific than … … 252 252 253 253 Where command is any of the following (with arguments): 254 254 255 255 initdb 256 256 list [aro | aco | axo | all | perms] … … 268 268 revoke aro [aco] [axo] 269 269 delete [aro] [aco] [axo] 270 271 272 For the add*, mv*, grant, and revoke commands if any of the optional 273 args are not provided, 'root' is assumed. For the delete command 270 271 272 For the add*, mv*, grant, and revoke commands if any of the optional 273 args are not provided, 'root' is assumed. For the delete command 274 274 'null' is considered a wild-card to delete all objects of that type. 275 275 … … 297 297 $db =& DB::getInstance(); 298 298 global $this_script; 299 299 300 300 echo "\n"; 301 301 … … 324 324 $qid = $db->query("SELECT lft, rgt FROM $tbl WHERE name = '" . $db->escapeString($root) . "'"); 325 325 list($lft, $rgt) = mysql_fetch_row($qid); 326 326 327 327 $depth = array(); 328 328 329 329 // Retrieve all descendants of the root node 330 330 $qid = $db->query("SELECT name, lft, rgt, added_datetime FROM $tbl WHERE lft BETWEEN $lft AND $rgt ORDER BY lft ASC"); … … 334 334 array_pop($depth); 335 335 } 336 336 337 337 // Display indented node title. 338 338 printf("%-35s %-5s %-5s %s\n", str_repeat(' ', sizeof($depth)) . $name, $lft, $rgt, date($app->getParam('date_format'), strtotime($added_datetime))); 339 339 340 340 // Add this node to the stack. 341 341 $depth[] = $rgt; … … 356 356 $db =& DB::getInstance(); 357 357 global $this_script; 358 358 359 359 // Retrieve access value from db. 360 360 $qid = $db->query(" … … 371 371 while ($p = mysql_fetch_assoc($qid)) { 372 372 printf("%-25s %-25s %-25s \033[0;%sm%-6s\033[0m %-10s\n", $p['aro'], $p['aco'], $p['axo'], ('allow' == $p['access'] ? '32' : '31'), $p['access'], date($app->getParam('date_format'), strtotime($p['added_datetime']))); 373 } 374 } 375 376 377 ?> 373 } 374 } 375 376 -
trunk/bin/file_importer.php
r412 r468 123 123 // } 124 124 // 125 // ?> -
trunk/bin/module_maker/_config.inc.php
r457 r468 73 73 74 74 75 ?> -
trunk/bin/module_maker/form_template.cli.php
r412 r468 249 249 250 250 echo join("\n", $output); 251 252 ?> -
trunk/bin/module_maker/list_template.cli.php
r461 r468 36 36 $db_tbl = $_SERVER['argv'][2]; 37 37 } else { 38 die(sprintf("Usage: %s site_directory db_table [operation]\nValid operations include: %s ", basename($_SERVER['argv'][0]), join(', ', $valid_ops)));38 die(sprintf("Usage: %s site_directory db_table [operation]\nValid operations include: %s\n", basename($_SERVER['argv'][0]), join(', ', $valid_ops))); 39 39 } 40 40 … … 213 213 214 214 E_O_F; 215 216 ?> -
trunk/bin/module_maker/module.cli.php
r413 r468 596 596 } 597 597 } 598 599 ?> -
trunk/bin/module_maker/skel/admin.php
r408 r468 4 4 * For details visit the project site: <http://trac.strangecode.com/codebase/> 5 5 * Copyright 2001-2012 Strangecode, LLC 6 * 6 * 7 7 * This file is part of The Strangecode Codebase. 8 8 * … … 11 11 * Free Software Foundation, either version 3 of the License, or (at your option) 12 12 * any later version. 13 * 13 * 14 14 * The Strangecode Codebase is distributed in the hope that it will be useful, but 15 15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 16 16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 17 * details. 18 * 18 * 19 19 * You should have received a copy of the GNU General Public License along with 20 20 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 236 236 $db =& DB::getInstance(); 237 237 $app =& App::getInstance(); 238 238 239 239 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); 240 240 if ($lock->isLocked() && !$lock->isMine()) { … … 278 278 $db =& DB::getInstance(); 279 279 $app =& App::getInstance(); 280 280 281 281 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); 282 282 if ($lock->isLocked() && !$lock->isMine()) { … … 314 314 $db =& DB::getInstance(); 315 315 $app =& App::getInstance(); 316 316 317 317 // Remove any stale cached list data. 318 318 $cache->delete('list'); … … 337 337 $db =& DB::getInstance(); 338 338 $app =& App::getInstance(); 339 339 340 340 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%']); 341 341 if ($lock->isLocked() && !$lock->isMine()) { … … 364 364 global $tmp_prefs; 365 365 global $cache; 366 $db =& DB::getInstance(); 367 $app =& App::getInstance(); 368 366 $db =& DB::getInstance(); 367 $app =& App::getInstance(); 368 369 369 $where_clause = ''; 370 370 … … 379 379 if (getFormData('filter___///__', false)) { 380 380 // Limit by filter. 381 $where_clause .= (empty($where_clause) ? 'WHERE' : ' AND') . " __///__ = '" . $db->escapeString(getFormData('filter___///__')) . "'";381 $where_clause .= (empty($where_clause) ? 'WHERE' : ' AND') . " __///__ = '" . $db->escapeString(getFormData('filter___///__')) . "'"; 382 382 } 383 383 … … 425 425 return $list; 426 426 } 427 427 428 428 // The list was not cached, so issue the real query. 429 429 $qid = $db->query($sql); … … 445 445 $db =& DB::getInstance(); 446 446 $app =& App::getInstance(); 447 447 448 448 if (!is_array($ranks)) { 449 449 $app->logMsg('Saving rank failed, data posted is not an array: ' . $ranks, LOG_ERR, __FILE__, __LINE__); … … 476 476 } 477 477 } 478 479 ?> -
trunk/bin/module_maker/skel/public.php
r396 r468 145 145 include 'footer.ihtml'; 146 146 147 ?> -
trunk/bin/module_maker/sql.cli.php
r412 r468 5 5 * For details visit the project site: <http://trac.strangecode.com/codebase/> 6 6 * Copyright 2001-2012 Strangecode, LLC 7 * 7 * 8 8 * This file is part of The Strangecode Codebase. 9 9 * … … 12 12 * Free Software Foundation, either version 3 of the License, or (at your option) 13 13 * any later version. 14 * 14 * 15 15 * The Strangecode Codebase is distributed in the hope that it will be useful, but 16 16 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 18 * details. 19 * 19 * 20 20 * You should have received a copy of the GNU General Public License along with 21 21 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 36 36 $db_tbl = $_SERVER['argv'][2]; 37 37 } else { 38 die(sprintf("Usage: %s site_directory db_table [operation]\nValid operations include: %s ", basename($_SERVER['argv'][0]), join(', ', $valid_ops)));38 die(sprintf("Usage: %s site_directory db_table [operation]\nValid operations include: %s\n", basename($_SERVER['argv'][0]), join(', ', $valid_ops))); 39 39 } 40 40 … … 218 218 219 219 echo isset($op) ? '' : "\n\n\n"; 220 ?> -
trunk/bin/module_maker/validation.cli.php
r412 r468 309 309 " . join("\n ", $o) . " 310 310 }"; 311 ?>
Note: See TracChangeset
for help on using the changeset viewer.