Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-12397

db_tools::sql_unique_index_exists() has wrong doc block

    Details

      Description

      The description is wrong:

      	/**
      	* Check if a specified index exists in table. Does not return PRIMARY KEY and UNIQUE indexes.
      	*
      	* @param string	$table_name		Table to check the index at
      	* @param string	$index_name		The index name to check
      	*
      	* @return bool True if index exists, else false
      	*/
      

        Issue Links

          Activity

          Hide
          aleha aleha added a comment -

          Change only the function description or also the description of the result and the parameters too like the following?

          	/**
          	* Check if a specified unique index exists in table. Does not return PRIMARY KEY and UNIQUE indexes.
          	*
          	* @param string	$table_name		Table to check the unique index at
          	* @param string	$index_name		The unique index name to check
          	*
          	* @return bool True if unique index exists, else false
          	*/
          

          There is also a typo at line L895 . I could create a PR if you like so let me know what you think about the description.

          Show
          aleha aleha added a comment - Change only the function description or also the description of the result and the parameters too like the following? /** * Check if a specified unique index exists in table. Does not return PRIMARY KEY and UNIQUE indexes. * * @param string $table_name Table to check the unique index at * @param string $index_name The unique index name to check * * @return bool True if unique index exists, else false */ There is also a typo at line L895 . I could create a PR if you like so let me know what you think about the description.
          Hide
          nickvergessen Joas Schilling added a comment -

          Well Does not return PRIMARY KEY and UNIQUE indexes. is wrong. The function is there to check for unique indexes

          Show
          nickvergessen Joas Schilling added a comment - Well Does not return PRIMARY KEY and UNIQUE indexes. is wrong. The function is there to check for unique indexes
          Hide
          aleha aleha added a comment -

          Agreed. Same goes also for sql_index_exists

          Show
          aleha aleha added a comment - Agreed. Same goes also for sql_index_exists
          Hide
          nickvergessen Joas Schilling added a comment -

          No, that's exactly the difference between these two. sql_unique_index_exists() does check UNIQUE indexes, sql_index_exists() does not.

          Show
          nickvergessen Joas Schilling added a comment - No, that's exactly the difference between these two. sql_unique_index_exists() does check UNIQUE indexes, sql_index_exists() does not.
          Hide
          aleha aleha added a comment -

          Got it after I took a closer look at the psql queries.

          Show
          aleha aleha added a comment - Got it after I took a closer look at the psql queries.

            People

            • Assignee:
              bantu Andreas Fischer
              Reporter:
              nickvergessen Joas Schilling
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development