Changeset 1417
- Timestamp:
- 12/07/07 19:31:21 (9 months ago)
- Files:
-
- devel/lib/elgglib.php (modified) (1 diff)
- devel/mod/admin/lib.php (modified) (1 diff)
- devel/mod/elggadmin (copied) (copied from releases/0.9/mod/elggadmin)
- devel/mod/elggadmin/configdef.php (copied) (copied from releases/0.9/mod/elggadmin/configdef.php)
- devel/mod/elggadmin/elggadmin.css (copied) (copied from releases/0.9/mod/elggadmin/elggadmin.css)
- devel/mod/elggadmin/engine.php (copied) (copied from releases/0.9/mod/elggadmin/engine.php)
- devel/mod/elggadmin/index.php (copied) (copied from releases/0.9/mod/elggadmin/index.php)
- devel/mod/elggadmin/lib.php (copied) (copied from releases/0.9/mod/elggadmin/lib.php)
- devel/mod/pages/lib.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/lib/elgglib.php
r1392 r1417 3738 3738 // complain if the DB has a different 3739 3739 // value than config.php does 3740 error_log("\$CFG->{$config->name} in config.php ({$localcfg[$config->name]}) overrides database setting ({$config->value})"); 3740 //error_log("\$CFG->{$config->name} in config.php ({$localcfg[$config->name]}) overrides database setting ({$config->value})"); 3741 3742 //Rho: override config values with ones provided in database 3743 $localcfg[$config->name] = $config->value; 3741 3744 } 3742 3745 } devel/mod/admin/lib.php
r1397 r1417 146 146 $url = get_url($object_id, $object_type); 147 147 148 if (strpos($url, '?') === 'false') {148 if (strpos($url, '?') === false) { 149 149 $sep = '?'; 150 150 } else { devel/mod/pages/lib.php
r1411 r1417 472 472 473 473 function pages_html_input($type, $attrs=null) { 474 474 if (!isset($attrs)) $attrs = array(); 475 475 476 $attrs = array_merge(array('type' => $type), $attrs); 476 477 … … 478 479 } 479 480 480 function pages_html_form($name, $body, $method='post', $action='', $attrs=null) { 481 $body .= pages_html_input('hidden', array('name'=>'form_key', 'value'=>elggform_get_key())); 482 $attrs = array_merge(array('id'=>$name, 'name'=>$name, 'method'=>$method, 'action'=>$action,), $attrs); 481 function pages_html_form($name, $body, $attrs=null) { 482 if (!isset($attrs)) {$attrs = array();} 483 484 if (!isset($attrs['id'])) { $attrs['id'] = $name; } 485 if (!isset($attrs['name'])) { $attrs['name'] = $name; } 486 if (!isset($attrs['method'])) { $attrs['method'] = 'post'; } 487 if (!isset($attrs['action'])) { $attrs['action'] = ''; } 488 489 if (isset($attrs['buttons'])) { 490 $buttons = $attrs['buttons']; 491 } else { 492 $buttons = pages_html_input('submit', array('value' => __gettext('Submit'))); 493 } 494 495 // add form key 496 $buttons .= pages_html_input('hidden', array('name'=>'form_key', 'value'=>elggform_key_get($name))); 497 498 $body .= pages_html_wrap('div', $buttons, array('class' => 'form-buttons')); 499 483 500 return pages_html_wrap('form', $body, $attrs); 484 501 } 485 502 486 503 function pages_html_select($name, $options, $attrs=null) { 504 if (!isset($attrs)) $attrs = array(); 505 487 506 $opts = ''; 488 507 foreach ($options as $opt) { … … 508 527 foreach ($props as $prop => $val) { 509 528 $result .= " {$prop}=" . $db->qstr($val, true); 529 } 530 531 return $result; 532 } 533 534 function pages_is_submitted() { 535 $result = false; 536 537 if (isset($_POST['submit']) || strtolower($_SERVER['REQUEST_METHOD']) == 'post') { 538 $result = true; 510 539 } 511 540
