Changeset 3165917
- Timestamp:
- 10/09/2024 03:42:58 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zotero-notes/trunk/class.zotero-notes-referencesList.php
r2102112 r3165917 63 63 function add_reference( $the_ID, $reference ) { 64 64 65 $ref_num = count( $this->_liste_references[ $the_ID ] ) + 1; 65 if ( empty( $this->_liste_references[ $the_ID ] ) ) 66 $ref_num = 1; 67 else 68 $ref_num = count( $this->_liste_references[ $the_ID ] ) + 1; 66 69 $reference->set_ref_num( $ref_num ); 67 70 $this->_liste_references[ $the_ID ][] = $reference; … … 151 154 152 155 $the_ID = get_the_ID(); 153 $count = count( $this->_liste_references[$the_ID] ); 156 if ( empty( $this->_liste_references[$the_ID] ) ) 157 $count = 0; 158 else 159 $count = count( $this->_liste_references[$the_ID] ); 154 160 155 161 if ( $count > 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.