Problem/Motivation

Current module documentaion described in API.txt file http://cgit.drupalcode.org/aes/tree/API.txt

Proposed resolution

Rewrite module documentation to aes.api.php accordingly to recomendation https://www.drupal.org/update/modules/6/7#api_php

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andriyun’s picture

Title: Documentaion » Rewtide documentaion to aes.api.php
dpovshed’s picture

Issue tags: +SprintWeekend2015

great, please go for it!

dpovshed’s picture

Title: Rewtide documentaion to aes.api.php » Rewrite documentation to aes.api.php
andriyun’s picture

Assigned: Unassigned » andriyun
andriyun’s picture

Status: Active » Needs review
FileSize
18.62 KB

There is patch provide new doc file aes.api.php insted old API.txt
and add docblock to aes.module for functions

podarok’s picture

Status: Needs review » Needs work
  1. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + *   The encrypted string on success, false on error.
    

    FASLE
    boolean in Drupal should be UPPERCASE

  2. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + * // Default using.
    

    usage

  3. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + * // Extended using.
    

    usage

  4. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + *   Use this as the key rather than the stored one for this operation.
    ...
    + *   Use this cipher rather than the default one. (only with Mcrypt - ignored with phpseclib)
    

    for the operation

  5. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + *   Use this cipher rather than the default one. (only with Mcrypt - ignored with phpseclib)
    ...
    + *   Can be "phpseclib" or "mcrypt". Warning: Does not check if the requested implementation actually exists.
    

    80 symbols per line. please

  6. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + * @param int $uid The user ID.
    

    Remove trailing comment after $uid, please

  7. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + *   TRUE if encrypted password is exist. FALSE if not
    

    FALSE otherwise

  8. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + *   (optional) Whether to decrypt the password before returning it, or not. Defaults to false.
    

    80 symbols per line. please

  9. +++ b/aes.api.php
    @@ -0,0 +1,200 @@
    + *   The password in plain text on success, FALSE on failure.
    

    FALSE otherwise

  10. +++ b/aes.module
    @@ -63,6 +63,9 @@ function aes_permission() {
    + * Load phpseclib.
    

    Loads

  11. +++ b/aes.module
    @@ -106,6 +109,9 @@ function aes_show_password_page($access, $uid) {
    + * Init aes_config form.
    

    Inits

  12. +++ b/aes.module
    @@ -246,6 +252,9 @@ function aes_config() {
    + * Validate aes_config form.
    

    Validates

  13. +++ b/aes.module
    @@ -272,6 +281,9 @@ function aes_config_validate($form, &$form_state) {
    + * Submit aes_config form.
    

    Submits

  14. +++ b/aes.module
    @@ -551,6 +563,24 @@ function aes_user_alter(&$edit, $account) {
    + *     // You custom code
    

    fullstop please

  15. +++ b/aes.module
    @@ -551,6 +563,24 @@ function aes_user_alter(&$edit, $account) {
    + *   TRUE if encrypted password is exist. FALSE if not
    

    fullstop please

  16. +++ b/aes.module
    @@ -563,6 +593,31 @@ function aes_password_exists($uid) {
    + * @param int $uid The user ID.
    

    Remove trailing comment

  17. +++ b/aes.module
    @@ -563,6 +593,31 @@ function aes_password_exists($uid) {
    + *   (optional) Whether to decrypt the password before returning it, or not. Defaults to false.
    

    wrap to 80 symbols per line. please

  18. +++ b/aes.module
    @@ -563,6 +593,31 @@ function aes_password_exists($uid) {
    + *   The password in plain text on success, FALSE on failure.
    

    FALSE otherwise

  19. +++ b/aes.module
    @@ -580,6 +635,12 @@ function aes_get_password($uid, $decrypt = FALSE) {
    + * Gets the current key used for the encryption system. If there's currently no key defined, this function will generate one, store it, and return it.
    

    80 symbols per line, please

  20. +++ b/aes.module
    @@ -580,6 +635,12 @@ function aes_get_password($uid, $decrypt = FALSE) {
    + * @return
    

    @return string

  21. +++ b/aes.module
    @@ -603,6 +664,15 @@ function aes_get_key() {
    + * Stores the key given by writing it to the storage method currently used (database or file).
    

    80 symbols per line

  22. +++ b/aes.module
    @@ -603,6 +664,15 @@ function aes_get_key() {
    + * @return
    

    @return bool

  23. +++ b/aes.module
    @@ -603,6 +664,15 @@ function aes_get_key() {
    + *   True on success, false on failure.
    

    TRUE and FALSE everywhere

    FALSE otherwise

  24. +++ b/aes.module
    @@ -672,8 +748,13 @@ function aes_make_key() {
    + *   The flag to ignore implementation mode.
    

    Explain it, FALSE = something, TRUE otherwise

andriyun’s picture

FileSize
24.03 KB
12.68 KB

@podarok Thanks a lot for review.
Review fixes.

andriyun’s picture

Status: Needs work » Needs review
dpovshed’s picture

  1. +++ b/aes.module
    @@ -551,6 +570,25 @@ function aes_user_alter(&$edit, $account) {
    + *     // You custom code
    

    'Your custom code'

  2. +++ b/aes.module
    @@ -563,6 +601,32 @@ function aes_password_exists($uid) {
    + * @param bool $decrypt The user ID.
    + *   (optional) Whether to decrypt the password before returning it, or not.
    + *   Defaults to false.
    + * @see aes_ajax_callback()
    

    - $decrypt is not an user ID;

    - again, false => FALSE

  • dpovshed committed 94c027e on 7.x-1.x authored by andriyun
    Issue #2409773 by andriyun: Rewrite documentation to aes.api.php
    
dpovshed’s picture

Status: Needs review » Fixed

Committed, slightly tuned after commit. Thanks @andriyun & @podarok!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.