Lines Matching refs:rowid
567 * @param index $rowid optional rowid element is related to
571 protected function varname( $name, $rowid = null ) argument
573 return 'db2do' . $name . ( $rowid ? $rowid : '' ) . '[' .
692 $rowid = intval( $matches[2] );
693 if ( $rowid )
694 $rowACL = $this->getRowACL( $rowid );
696 $rowid = $rowACL = null;
729 if ( ( $action == 'insert' ) && $rowid )
744 $duplicateRowID = $rowid;
747 $rowid = null;
756 $result = $this->editRecord( $rowid, $readonly,
766 $rowid = $result;
778 $this->deleteRecord( $rowid );
788 if ( !call_user_func( $method, $rowid ) )
854 protected function getRowACL( $rowid ) argument
862 if ( !isset( $session['rowACLs'][$rowid] ) )
878 if ( !$st->execute( array( $rowid ) ) )
886 $session['rowACLs'][$rowid] = trim( $row[0] );
892 return $session['rowACLs'][$rowid] ? $session['rowACLs'][$rowid] : null;
897 protected function dropRowACL( $rowid ) argument
902 if ( $session['rowACLs'][$rowid] )
943 * @param integer $rowid unique numeric ID of record to edit/inspect
949 protected function editRecord( $rowid, $readOnly, $duplicateOf = null, argument
957 $isNew = !$rowid || $duplicateOf;
965 if ( $rowid && !$readOnly && !$this->obtainLock( $this->table, $rowid ) )
988 if ( $input && ( $input['____single'] === md5( $rowid ) ) )
1017 if ( $rowid && !$readOnly && !$this->releaseLock( $this->table, $rowid ) )
1046 if ( $rowid )
1052 $error = $this->checkValue( $rowid, $column, $input['data'.$column], $store[$column], $def );
1087 $value = $this->valueToDB( $rowid, $column, $value, $this->meta[$column] );
1121 $record[$idColumn] = $rowid;
1123 $log = array( $rowid, 'update' );
1148 if ( $rowid && !$readOnly && !$this->releaseLock( $this->table, $rowid, true ) )
1214 if ( !$st->execute( array( $duplicateOf ? $duplicateOf : $rowid ) ) )
1245 $store[$column] = $this->valueFromDB( $rowid, $column, $value, $this->meta[$column] );
1262 $input['____idx'] = $this->recordI2X( $rowid );
1295 $elements[] = $this->renderField( $rowid, $column, $value,
1302 if ( $readOnly && $rowid )
1303 $cmdName = 'inspect' . $rowid;
1304 else if ( $rowid )
1305 $cmdName = 'edit' . $rowid;
1312 $this->varname( '____single' ) => md5( $rowid ),
1370 * @param integer $rowid ID of row to delete
1373 protected function deleteRecord( $rowid ) argument
1376 if ( !$rowid || !ctype_digit( trim( $rowid ) ) )
1386 if ( !$this->obtainLock( $this->table, $rowid, true, true ) )
1401 if ( !$st->execute( array( $rowid ) ) )
1404 $this->log( 'delete', $this->table, $rowid );
1830 $rowid = $idCol ? intval( $row[$idCol] ) : 0;
1869 $value = $this->valueFromDB( $rowid, $column, $value, $def );
1871 $cell = $this->renderValue( $rowid, $column, $value, $def,
1888 $this->varname( 'cmd' . $clickAction, $rowid ) .
1910 $this->getRecordCommands( $rowid, $rowACL, $clicks ) .
2556 * @param integer $rowid ID of record
2560 protected function getRecordCommands( $rowid, $rowACL = null, $clickActions = null ) argument
2563 $rowid = intval( $rowid );
2564 if ( !$rowid )
2596 $idName = $this->varname( 'cmd' . $name, $rowid );
2668 protected function recordI2X( $rowid ) argument
2690 if ( $record[0] == $rowid )
4266 * @param integer $rowid ID of record changed
4269 protected function log( $action, $table, $rowid = null ) argument
4294 if ( !$st->execute( array( $table, intval( $rowid ), $action,
4317 * @param integer $rowid unique (!!) ID of record lock is related to, omit
4325 …protected function obtainLock( $table, $rowid = null, $inTransaction = false, $checkOnly = false, … argument
4348 $rowid = intval( $rowid );
4360 if ( $rowid )
4400 if ( !$st->execute( array( $table, $rowid ) ) )
4439 if ( !$st->execute( array( $currentUser, time(), $table, $rowid ) ))
4472 * @param integer $rowid unique (!!) ID of record lock is related to, omit
4478 protected function releaseLock( $table, $rowid = null, $inTransaction = false ) argument
4491 $rowid = intval( $rowid );
4500 if ( !$this->obtainLock( $table, $rowid, true, true, true ) )
4511 if ( !$st->execute( array( $table, $rowid, $currentUser ) ) )
4539 * @param integer $rowid unique numeric ID of selected record
4545 final protected function mediaLink( $rowid, $column, $forDownload = false, argument
4550 $rowid = intval( $rowid );
4553 if ( !$rowid || ( $this->meta[$column]['type'] != 'data' ) )
4572 $column, $idColumn, $rowid, $this->getPageID(),
5022 * @param integer $rowid ID of row containing given value
5029 protected function valueFromDB( $rowid, $column, $value, $def ) argument
5150 * @param integer $rowid ID of row containing given value
5158 protected function valueToDB( $rowid, &$column, $value, $def ) argument
5249 $this->dropRowACL( $rowid );
5279 * @param integer $rowid ID of row containing given value
5287 protected function checkValue( $rowid, &$column, $value, &$inStore, $def ) argument
5707 * @param integer $rowid ID of row containing given value
5716 protected function renderField( $rowid, $column, $value, $def, $error, $readOnly, &$rowACL ) argument
5719 if ( $rowid === true )
5729 else if ( $rowid === false )
5801 $code = $this->renderValue( $rowid, $column, $value, $def, true, true, $rowACL );
5824 return $this->renderField( $rowid, $column, $value, $def, '', true, $rowACL );
5829 if ( $rowid )
5862 $current = $this->renderValue( $rowid, $column, $value, $def, true, true, $rowACL );
5995 * @param integer $rowid ID of row containing given value
6007 protected function renderValue( $rowid, $column, $value, $def, argument
6058 $url = $this->mediaLink( $rowid, $column, ( $def['format'] != 'image' ) );